mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Resolution-independent trash icon
Also, generate the corresponding pixmap only once, and distribute it to all models that need it. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
60702f104c
commit
dfec501e7a
4 changed files with 44 additions and 5 deletions
|
|
@ -615,7 +615,13 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const
|
|||
switch (index.column()) {
|
||||
case REMOVE:
|
||||
if (rowCount() > 1)
|
||||
return p.entered ? QIcon(":trash") : QVariant();
|
||||
return p.entered ? trashIcon() : QVariant();
|
||||
}
|
||||
} else if (role == Qt::SizeHintRole) {
|
||||
switch (index.column()) {
|
||||
case REMOVE:
|
||||
if (rowCount() > 1)
|
||||
return p.entered ? trashIcon().size() : QVariant();
|
||||
}
|
||||
} else if (role == Qt::FontRole) {
|
||||
if (divepoints.at(index.row()).entered) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue