mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
7f783e2147
commit
b1e50fb157
3 changed files with 4 additions and 0 deletions
BIN
icons/gaschange.png
Normal file
BIN
icons/gaschange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue