mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0171368b6d
commit
d8f756fe14
2 changed files with 40 additions and 21 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue