Skip to content

Commit

Permalink
profile: replace bookmark event icon PNG by SVG
Browse files Browse the repository at this point in the history
This looks much better on print-outs. The remaining event icons
still need to be converted to SVG.

SVG created by Lubomir I. Ivanov <[email protected]> and
made compatible with the Qt SVG renderer by BS.

Signed-off-by: Berthold Stoeger <[email protected]>
  • Loading branch information
bstoeger authored and dirkhh committed Dec 17, 2021
1 parent f7565c4 commit 1d58553
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 2 deletions.
Binary file removed icons/flag.png
Binary file not shown.
83 changes: 83 additions & 0 deletions icons/flag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion profile-widget/divepixmapcache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "divepixmapcache.h"
#include "core/metrics.h"
#include "core/qthelper.h" // for renderSVGIconWidth

#include <cmath>

Expand Down Expand Up @@ -40,7 +41,7 @@ DivePixmaps::DivePixmaps(int dpr) : dpr(dpr)
violation = createPixmap(":status-violation-icon", sz_pix);
bailout = createPixmap(":bailout-icon", sz_pix);
onCCRLoop = createPixmap(":onCCRLoop-icon", sz_pix);
bookmark = createPixmap(":dive-bookmark-icon", sz_pix);
bookmark = QPixmap::fromImage(renderSVGIconWidth(":dive-bookmark-icon", sz_pix));
gaschangeTrimixICD = createPixmap(":gaschange-trimix-ICD-icon", sz_bigger);
gaschangeTrimix = createPixmap(":gaschange-trimix-icon", sz_bigger);
gaschangeAirICD = createPixmap(":gaschange-air-ICD-icon", sz_bigger);
Expand Down
2 changes: 1 addition & 1 deletion subsurface.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<file alias="onCCRLoop-icon">icons/CCR.png</file>
<file alias="bailout-icon">icons/OC.png</file>
<file alias="salinity-warning-icon">icons/bluewarning.png</file>
<file alias="dive-bookmark-icon">icons/flag.png</file>
<file alias="dive-bookmark-icon">icons/flag.svg</file>
<file alias="ruler-icon">icons/ruler.png</file>
<file alias="poster-icon">icons/poster.png</file>
<file>xslt/commonTemplates.xsl</file>
Expand Down

0 comments on commit 1d58553

Please sign in to comment.