From fc4d0a79332153f08acb7b0f9cacb48862278238 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Tue, 30 Jul 2013 22:00:17 +0200 Subject: [PATCH] Try to guess a sane base font size on Mac --- src/libtomahawk/utils/DpiScaler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/utils/DpiScaler.cpp b/src/libtomahawk/utils/DpiScaler.cpp index 1c50b2af9..05dccbe18 100644 --- a/src/libtomahawk/utils/DpiScaler.cpp +++ b/src/libtomahawk/utils/DpiScaler.cpp @@ -126,7 +126,14 @@ DpiScaler::ratioFromFontHeight() int fH = QFontMetrics( f ).ascent() + 1; //a font's em-height should be ascent + 1px (baseline) qreal basePpp = s_baseDpi / 72.; //72*(1.333)=96 dpi - qreal baseFontHeight = 7 * basePpp; //we assume a minimum font size of 7pt + +#ifdef Q_OS_MAC + const int baseFontSize = 13; +#else + const int baseFontSize = 7; +#endif + + qreal baseFontHeight = baseFontSize * basePpp; //we assume a minimum font size of 7pt qreal ratioFromFontHeights = qMax( fH / baseFontHeight, 1. ); return ratioFromFontHeights;