summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling_p.h
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-06-16 13:16:03 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-06-18 12:52:52 +0000
commit30ab9184ad452c892ddd02126ff52d7c7b5f5c38 (patch)
tree6798b50866c5cd98d866ba3b234d52b0d265135c /src/gui/kernel/qhighdpiscaling_p.h
parent41bb5f362e49cc68b85022b749aaf654fa5c55bf (diff)
Only turn off font hinting when really scaling
We don't want to turn off font hinting based on whether auto-scaling is on, otherwise Qt Creator will look bad on a low-DPI screen. Instead, we turn it off only if we have at least one screen that is scaled. QHighDpiScaling::isActive() now means that there is actual scaling going on. There is currently no need for the old meaning, so this change does not include QHighDpiScaling::isEnabled(). Note that nothing can save us from the case where there is one high-DPI and one low-DPI screen. In that case we choose looking bad on the low-DPI screen instead of looking like crap on the high-DPI screen. Also note that our font system we doesn't allow us to change our minds on hinting later when screens are plugged in or removed. Change-Id: I14a4ec7a49f4ba74a4c74684c7b951d0a71b951d Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling_p.h')
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index bf967d10ad..d60be86518 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -60,7 +60,8 @@ class QPlatformScreen;
class Q_GUI_EXPORT QHighDpiScaling {
public:
- static void initHighDPiScaling();
+ static void initHighDpiScaling();
+ static void updateHighDpiScaling();
static void setGlobalFactor(qreal factor);
static void setScreenFactor(QScreen *window, qreal factor);
@@ -77,8 +78,10 @@ private:
static qreal m_factor;
static bool m_active;
- static bool m_perScreenActive;
static bool m_usePixelDensity;
+ static bool m_globalScalingActive;
+ static bool m_pixelDensityScalingActive;
+ static bool m_screenFactorSet;
};
// Coordinate system conversion functions: