!36 add and use attribute of UseHighDpiPixmaps

From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2022-08-05 03:34:18 +00:00 committed by Gitee
commit f1acfc8b1f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 746dea55c9b8465944430ecb8544d2c68b4fd3ab Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Thu, 4 Aug 2022 11:51:36 +0800
Subject: [PATCH] add and use attribute of UseHighDpiPixmaps
---
src/ukui-screensaver-dialog.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/ukui-screensaver-dialog.cpp b/src/ukui-screensaver-dialog.cpp
index cd69513..ad49e1b 100644
--- a/src/ukui-screensaver-dialog.cpp
+++ b/src/ukui-screensaver-dialog.cpp
@@ -116,6 +116,11 @@ int main(int argc, char *argv[])
{
checkIsRunning();
checkIslivecd();
+ #if(QT_VERSION >= QT_VERSION_CHECK(5,6,0))
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+ #endif
+
QApplication a(argc, argv);
QApplication::setSetuidAllowed(true);
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: ukui-screensaver
Version: 3.0.1
Release: 20
Release: 21
Summary: parallels toolbox for UKUI
License: GPL-2.0-or-later and GPL-3.0-or-later
URL: http://www.ukui.org
@ -26,6 +26,8 @@ Requires: qt5-qttools-devel
Requires: gsettings-qt-devel
Requires: dconf-devel
patch0 : 0001-add-and-use-attribute-of-UseHighDpiPixmaps.patch
%description
The ukui-sidebar is mainly used in the desktop operating system.
It pops up from the right side of the desktop in the form of a tray,
@ -34,6 +36,7 @@ Requires: dconf-devel
%prep
%setup -q
%patch0 -p1
%build
cmake .
@ -62,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
#%%{_datadir}/ukui-screensaver/screensaver-en.ini
%changelog
* Thu Aug 04 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-21
- add and use attribute of UseHighDpiPixmaps
* Fri May 20 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-20
- Improve the project according to the requirements of compliance improvement