diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2014-10-15 15:30:47 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-18 15:15:53 -0700 |
commit | d8f756fe1471b5f1ac7be16d922b87256c0cded6 (patch) | |
tree | 824f2b464b71804eb4d7576e3a86e32b236ad973 /qt-ui/profile/divetooltipitem.h | |
parent | 0171368b6dd32d02441096b358893f1e72d6848f (diff) | |
download | subsurface-d8f756fe1471b5f1ac7be16d922b87256c0cded6.tar.gz |
Dynamic ToolTipItem metrics
Instead of hard-coding the icon sizes and spacing, compute them from the
font sizes, that Qt auto-computes from the displya DPI.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divetooltipitem.h')
-rw-r--r-- | qt-ui/profile/divetooltipitem.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/qt-ui/profile/divetooltipitem.h b/qt-ui/profile/divetooltipitem.h index e0e65638a..bdb7627e7 100644 --- a/qt-ui/profile/divetooltipitem.h +++ b/qt-ui/profile/divetooltipitem.h @@ -27,11 +27,12 @@ public: COLLAPSED, EXPANDED }; - enum { - ICON_SMALL = 16, - ICON_MEDIUM = 24, - ICON_BIG = 32, - SPACING = 4 + + struct IconMetrics { + int small; + int medium; + int big; + int spacing; }; explicit ToolTipItem(QGraphicsItem *parent = 0); @@ -67,6 +68,8 @@ private: int lastTime; QList<QGraphicsItem*> oldSelection; + + static IconMetrics iconMetrics; }; #endif // DIVETOOLTIPITEM_H |