aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Giuseppe Bilotta <giuseppe.bilotta@gmail.com>2014-10-19 16:15:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-19 07:23:36 -0700
commitdfec501e7a1cd26dc2ff4d675a3c8d91ac86aaa5 (patch)
tree08f86ceb31922b2a40d1a16585d421fbfddd008f /qt-ui/diveplanner.cpp
parent60702f104ca5f27c6399db22e4a4bdf2d4b6791f (diff)
downloadsubsurface-dfec501e7a1cd26dc2ff4d675a3c8d91ac86aaa5.tar.gz
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>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 2e382051e..b8ca2fb27 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -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) {