diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 21:07:39 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 21:07:39 -0700 |
commit | b1e50fb157c6c86af28d4beb4e365ec15a08e748 (patch) | |
tree | 187241212b01a471433b2322b92bee5cc27d84be | |
parent | 7f783e2147d4014cd4297316c3c062d8ce3ba3b7 (diff) | |
download | subsurface-b1e50fb157c6c86af28d4beb4e365ec15a08e748.tar.gz |
Profile: change event icon for gaschange
This is not ideal, but it gets us closer to what we need.
Fixes #556
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | icons/gaschange.png | bin | 0 -> 3344 bytes | |||
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 3 | ||||
-rw-r--r-- | subsurface.qrc | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/icons/gaschange.png b/icons/gaschange.png Binary files differnew file mode 100644 index 000000000..200c132df --- /dev/null +++ b/icons/gaschange.png diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index f20d44e5c..73d58a672 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -58,12 +58,15 @@ void DiveEventItem::setEvent(struct event *ev) void DiveEventItem::setupPixmap() { #define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(20, 20, Qt::KeepAspectRatio, Qt::SmoothTransformation) +#define EVENT_PIXMAP_BIGGER(PIX) QPixmap(QString(PIX)).scaled(30, 28, Qt::KeepAspectRatio, Qt::SmoothTransformation) if (!internalEvent->name) { setPixmap(EVENT_PIXMAP(":warning")); } else if (internalEvent->type == SAMPLE_EVENT_BOOKMARK) { setPixmap(EVENT_PIXMAP(":flag")); } else if (strcmp(internalEvent->name, "heading") == 0) { setPixmap(EVENT_PIXMAP(":flag")); + } else if (internalEvent->type == SAMPLE_EVENT_GASCHANGE || internalEvent->type == SAMPLE_EVENT_GASCHANGE2) { + setPixmap(EVENT_PIXMAP_BIGGER(":gaschange")); } else { setPixmap(EVENT_PIXMAP(":warning")); } diff --git a/subsurface.qrc b/subsurface.qrc index 48dce73dd..1fc6d68ca 100644 --- a/subsurface.qrc +++ b/subsurface.qrc @@ -12,6 +12,7 @@ <file alias="maximum">icons/maximum.png</file> <file alias="average">icons/average.png</file> <file alias="warning">icons/warning.png</file> + <file alias="gaschange">icons/gaschange.png</file> <file alias="flag">icons/flag.png</file> <file alias="scale">icons/scale.png</file> <file alias="ruler">icons/ruler.png</file> |