!33 登录界面背景抗锯齿。用户未登录过桌面环境时,选择一个默认的桌面环境。
From: @liubuguiii Reviewed-by: @tangjie02 Signed-off-by: @tangjie02
This commit is contained in:
commit
7741a19b5b
28
0003-fix-greeter-Background-anti-aliasing.patch
Normal file
28
0003-fix-greeter-Background-anti-aliasing.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 2366f79318014f6ec569ea61f78b53a3b80efa3d Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
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
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
From c2cc47184ca2013c0f3f6f429190e271ebbf5147 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||||
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
|
||||
|
||||
@ -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 <liuxinhao@kylinsec.com.cn> - 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 <wangyucheng@kylinsec.om.cn> - 2.5.0-4
|
||||
- KYOS-F: Compatible for versions below 5.14
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user