38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 5e78ddb24d5b562d724282243617d115b5800fe6 Mon Sep 17 00:00:00 2001
|
|
From: tanyulong <tanyulong@kylinos.cn>
|
|
Date: Sat, 30 Oct 2021 14:57:31 +0800
|
|
Subject: [PATCH] Add fractional scaling parameters
|
|
|
|
---
|
|
src/ukui-screensaver-dialog.cpp | 12 +++++++++---
|
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/ukui-screensaver-dialog.cpp b/src/ukui-screensaver-dialog.cpp
|
|
index 237b377..c6b2d3a 100755
|
|
--- a/src/ukui-screensaver-dialog.cpp
|
|
+++ b/src/ukui-screensaver-dialog.cpp
|
|
@@ -124,11 +124,17 @@ int main(int argc, char *argv[])
|
|
checkIsRunning();
|
|
checkIslivecd();
|
|
|
|
-#if(QT_VERSION>=QT_VERSION_CHECK(5,6,0))
|
|
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
- QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
|
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
|
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
|
#endif
|
|
|
|
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
|
+ QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
|
+#endif
|
|
+
|
|
+
|
|
+
|
|
qunsetenv("QT_IM_MODULE");
|
|
// signal(SIGTERM,handler);
|
|
QApplication a(argc, argv);
|
|
--
|
|
2.30.0
|
|
|