46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
diff --git a/platformthemeplugin/qdeepintheme.cpp b/platformthemeplugin/qdeepintheme.cpp
|
|
index e98487b..45e90bc 100644
|
|
--- platformthemeplugin/qdeepintheme.cpp
|
|
+++ platformthemeplugin/qdeepintheme.cpp
|
|
@@ -571,10 +571,18 @@ static bool updateScreenScaleFactors(DThemeSettings *s, const QByteArray &value,
|
|
}
|
|
|
|
QHighDpiScaling::updateHighDpiScaling();
|
|
+#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
|
|
qDebug() << QHighDpiScaling::logicalDpi();
|
|
+#else
|
|
+ qDebug() << QHighDpiScaling::logicalDpi(QGuiApplication::primaryScreen());
|
|
+#endif
|
|
updateScaleLogcailDpi(s->scaleLogicalDpi());
|
|
|
|
+#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
|
|
qDebug() << QHighDpiScaling::logicalDpi();
|
|
+#else
|
|
+ qDebug() << QHighDpiScaling::logicalDpi(QGuiApplication::primaryScreen());
|
|
+#endif
|
|
|
|
return true;
|
|
}
|
|
--- platformthemeplugin/qdeepintheme.cpp 2019-12-19 17:45:47.396894045 +0800
|
|
+++ platformthemeplugin/qdeepintheme.cpp 2019-12-19 17:46:28.436136243 +0800
|
|
@@ -516,19 +516,7 @@
|
|
static bool updateScaleLogcailDpi(const QPair<qreal, qreal> &dpi)
|
|
{
|
|
bool ok = dpi.first >= 0 && dpi.second >= 0;
|
|
-
|
|
- if (dpi.first > 0) {
|
|
- QHighDpiScaling::m_logicalDpi.first = dpi.first;
|
|
- } else if (qIsNull(dpi.first)) {
|
|
- QHighDpiScaling::m_logicalDpi.first = qGuiApp->primaryScreen()->handle()->logicalDpi().first;
|
|
- }
|
|
-
|
|
- if (dpi.second > 0) {
|
|
- QHighDpiScaling::m_logicalDpi.second = dpi.second;
|
|
- } else if (qIsNull(dpi.second)) {
|
|
- QHighDpiScaling::m_logicalDpi.second = qGuiApp->primaryScreen()->handle()->logicalDpi().second;
|
|
- }
|
|
-
|
|
+ QHighDpiScaling::m_usePixelDensity = false;
|
|
return ok;
|
|
}
|
|
|