From 454cb79efd8837bdf818c1eb67d110ad0ed50786 Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Tue, 25 Apr 2023 10:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=8A=97=E9=94=AF=E9=BD=BF=E3=80=82=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E8=BF=87=E6=A1=8C=E9=9D=A2=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=97=B6=EF=BC=8C=E9=80=89=E6=8B=A9=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=9A=84=E6=A1=8C=E9=9D=A2=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...fix-greeter-Background-anti-aliasing.patch | 28 +++++++++++ ...-has-not-logged-in-to-a-desktop-envi.patch | 48 +++++++++++++++++++ kiran-session-guard.spec | 8 +++- 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 0003-fix-greeter-Background-anti-aliasing.patch create mode 100644 0004-fix-greeter-user-has-not-logged-in-to-a-desktop-envi.patch diff --git a/0003-fix-greeter-Background-anti-aliasing.patch b/0003-fix-greeter-Background-anti-aliasing.patch new file mode 100644 index 0000000..1f97166 --- /dev/null +++ b/0003-fix-greeter-Background-anti-aliasing.patch @@ -0,0 +1,28 @@ +From 2366f79318014f6ec569ea61f78b53a3b80efa3d Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 25 Apr 2023 10:45:47 +0800 +Subject: [PATCH 1/2] fix(greeter): Background anti-aliasing +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 背景抗锯齿 +--- + src/lightdm-greeter/background.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lightdm-greeter/background.cpp b/src/lightdm-greeter/background.cpp +index c9e6394..0b6e8f3 100644 +--- a/src/lightdm-greeter/background.cpp ++++ b/src/lightdm-greeter/background.cpp +@@ -122,6 +122,7 @@ void Background::resizeEvent(QResizeEvent *event) + void Background::paintEvent(QPaintEvent *event) + { + QPainter painter(this); ++ painter.setRenderHint(QPainter::Antialiasing); + if (!m_scaledBackground.isNull()) + { + painter.drawPixmap(this->rect(), m_scaledBackground, m_scaledBackground.rect()); +-- +2.33.0 + diff --git a/0004-fix-greeter-user-has-not-logged-in-to-a-desktop-envi.patch b/0004-fix-greeter-user-has-not-logged-in-to-a-desktop-envi.patch new file mode 100644 index 0000000..ee4153e --- /dev/null +++ b/0004-fix-greeter-user-has-not-logged-in-to-a-desktop-envi.patch @@ -0,0 +1,48 @@ +From c2cc47184ca2013c0f3f6f429190e271ebbf5147 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 25 Apr 2023 16:22:48 +0800 +Subject: [PATCH 2/2] fix(greeter): user has not logged in to a desktop + environment, selects a desktop environment by default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 用户未登录过桌面环境默认选择一个桌面环境 +--- + src/lightdm-greeter/frame.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/lightdm-greeter/frame.cpp b/src/lightdm-greeter/frame.cpp +index 10f1510..6b83247 100644 +--- a/src/lightdm-greeter/frame.cpp ++++ b/src/lightdm-greeter/frame.cpp +@@ -408,11 +408,26 @@ void Frame::onUserSelected(const QString& name) + + QString userSession = UserManager::getUserLastSession(name); + KLOG_DEBUG() << "user session:" << name << userSession; ++ + if (!userSession.isEmpty() && m_sessionItemMap.contains(userSession)) + { ++ // 默认选择用户上次进入的桌面环境 + auto sessionItem = m_sessionItemMap[userSession]; + sessionItem->setChecked(true); + } ++ else if (!m_sessionItemMap.isEmpty()) ++ { ++ // 该用户未登录过桌面环境 ++ auto kiranSession = m_sessionItemMap.find("kiran"); ++ if (kiranSession != m_sessionItemMap.end()) ++ { ++ (*kiranSession)->setChecked(true); ++ } ++ else ++ { ++ m_sessionItemMap.first()->setChecked(true); ++ } ++ } + + if (name == m_greeter->autologinUserHint()) + { +-- +2.33.0 + diff --git a/kiran-session-guard.spec b/kiran-session-guard.spec index f4ff507..2a9dc03 100644 --- a/kiran-session-guard.spec +++ b/kiran-session-guard.spec @@ -1,6 +1,6 @@ Name: kiran-session-guard Version: 2.5.0 -Release: 4 +Release: 5 Summary: Kiran desktop environment login and lock screen dialog Summary(zh_CN): Kiran桌面环境登录和解锁框 @@ -8,6 +8,8 @@ License: MulanPSL-2.0 Source0: %{name}-%{version}.tar.gz Patch0: 0001-fix-translate-add-some-translation.patch Patch1: 0002-fix-Compatible-for-versions-below-5.14.patch +Patch3: 0003-fix-greeter-Background-anti-aliasing.patch +Patch4: 0004-fix-greeter-user-has-not-logged-in-to-a-desktop-envi.patch %define SHOW_VIRTUAL_KEYBOARD 0 @@ -147,6 +149,10 @@ gtk-update-icon-cache -f /usr/share/icons/hicolor/ rm -rf %{buildroot} %changelog +* Tue Apr 25 2023 liuxinhao - 2.5.0-5 +- KYOS-F: Greeter background anti-aliasing +- KYOS-F: user has not logged in to a desktop environment, selects a desktop environment by default + * Sun Apr 23 2023 wangyucheng - 2.5.0-4 - KYOS-F: Compatible for versions below 5.14