diff options
Diffstat (limited to 'qt-ui/metrics.h')
-rw-r--r-- | qt-ui/metrics.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/qt-ui/metrics.h b/qt-ui/metrics.h new file mode 100644 index 000000000..ba45ab916 --- /dev/null +++ b/qt-ui/metrics.h @@ -0,0 +1,21 @@ +/* + * metrics.h + * + * header file for common function to find/compute essential UI metrics + * (font properties, icon sizes, etc) + * + */ +#ifndef METRICS_H +#define METRICS_H + +#include <QFont> +#include <QFontMetrics> + +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()); + +#endif // METRICS_H |