!17 use attribute of UseHighDpiPixmaps

From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2022-08-01 04:28:41 +00:00 committed by Gitee
commit 9329039cff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From a408cee19e004f1c3e0fea33696fd9a862deb05c Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 11:46:01 +0800
Subject: [PATCH] add and use attribute of UseHighDpiPixmaps
---
polkit-agent/src/PolkitAgent.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/polkit-agent/src/PolkitAgent.cpp b/polkit-agent/src/PolkitAgent.cpp
index 6966c05..31a234d 100755
--- a/polkit-agent/src/PolkitAgent.cpp
+++ b/polkit-agent/src/PolkitAgent.cpp
@@ -36,9 +36,14 @@ int main(int argc, char *argv[])
logPrefix = "[ukui-polkit]:";
qInstallMessageHandler(outputMessage);
- qDebug() << "Polkit Agent Started";
+ qDebug() << "Polkit Agent Started";
+ #if(QT_VERSION >= QT_VERSION_CHECK(5,6,0))
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+ #endif
+
- QApplication agent(argc, argv);
+ QApplication agent(argc, argv);
QString locale = QLocale::system().name();
qDebug() << "Language: " <<locale;
--
2.33.0

View File

@ -4,7 +4,7 @@
Name: ukui-biometric-auth
Summary: ukui-biometric-auth
Version: 1.2.1
Release: 5
Release: 6
License: GPL-3+
URL: https://github.com/ukui/ukui-biometric-auth
@ -14,6 +14,7 @@ BuildRequires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-d
Requires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config
Patch0: 0001-add-window-icon.patch
Patch1: 0002-add-and-use-attribute-of-UseHighDpiPixmaps.patch
%description
ukui-biometric-auth
@ -45,6 +46,7 @@ biometric-auth package.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
mkdir build
@ -79,6 +81,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
%changelog
* Mon Aug 01 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-6
- add and use attribute of UseHighDpiPixmaps
* Mon Aug 01 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-5
- add window icon