diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2014-10-15 15:30:52 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-18 15:16:15 -0700 |
commit | 32ab2b34d39752693697f0f2a33032ceb3f5f3b4 (patch) | |
tree | c661c4b6609647f364d09eae609ff5b672fc9f20 /qt-ui/metrics.h | |
parent | 72b256de629c7e4ef5c52d7a9ce62ebd68a77991 (diff) | |
download | subsurface-32ab2b34d39752693697f0f2a33032ceb3f5f3b4.tar.gz |
Unify icon metrics
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/metrics.h')
-rw-r--r-- | qt-ui/metrics.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/qt-ui/metrics.h b/qt-ui/metrics.h index ba45ab916..30295a3d8 100644 --- a/qt-ui/metrics.h +++ b/qt-ui/metrics.h @@ -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 |