mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Unify icon metrics
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
72b256de62
commit
32ab2b34d3
9 changed files with 72 additions and 70 deletions
|
@ -10,12 +10,23 @@
|
|||
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QSize>
|
||||
|
||||
QFont defaultModelFont();
|
||||
QFontMetrics defaultModelFontMetrics();
|
||||
|
||||
// return the default icon size, computed as the multiple of 16 closest to
|
||||
// the given height (that defaults to the default font height)
|
||||
int defaultIconSize(int height = defaultModelFontMetrics().height());
|
||||
// Collection of icon/picture sizes and other metrics, resolution independent
|
||||
struct IconMetrics {
|
||||
// icon sizes
|
||||
int sz_small; // ex 16px
|
||||
int sz_med; // ex 24px
|
||||
int sz_big; // ex 32px
|
||||
// picture size
|
||||
int sz_pic; // ex 128px
|
||||
// icon spacing
|
||||
int spacing; // ex 2px
|
||||
};
|
||||
|
||||
const IconMetrics & defaultIconMetrics();
|
||||
|
||||
#endif // METRICS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue