diff --git a/0005-fix-avatar-Update-authentication-users-and-user-list.patch b/0005-fix-avatar-Update-authentication-users-and-user-list.patch index 6494818..afc217c 100644 --- a/0005-fix-avatar-Update-authentication-users-and-user-list.patch +++ b/0005-fix-avatar-Update-authentication-users-and-user-list.patch @@ -1,7 +1,7 @@ From 251ad1e695739b2fc16a2be2bae4830fa4f9428c Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Mon, 21 Aug 2023 17:32:45 +0800 -Subject: [PATCH] fix(avatar): Update authentication users and user list +Subject: [PATCH 5/7] fix(avatar): Update authentication users and user list avatars in real time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -271,5 +271,5 @@ index 9e45f61..e58b39c 100644 Q_SIGNALS: void userActivated(const UserInfo &userInfo); -- -2.33.0 +2.27.0 diff --git a/0006-fix-compile-warning-Fixed-some-compilation-warnings.patch b/0006-fix-compile-warning-Fixed-some-compilation-warnings.patch index 3258f0b..e1e4627 100644 --- a/0006-fix-compile-warning-Fixed-some-compilation-warnings.patch +++ b/0006-fix-compile-warning-Fixed-some-compilation-warnings.patch @@ -1,7 +1,7 @@ From c259d0223202a986deb3d2eec7567380e7895ce9 Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Tue, 22 Aug 2023 11:47:25 +0800 -Subject: [PATCH] fix(compile warning): Fixed some compilation warnings +Subject: [PATCH 6/7] fix(compile warning): Fixed some compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -34,5 +34,5 @@ index 10fdbc5..6094a71 100644 m_switcher->setAdjustColorToTheme(true); m_switcher->setFixedSize(QSize(42, 36)); -- -2.33.0 +2.27.0 diff --git a/0007-fix-kiran-session-guard-fits-the-Qt5.9.7-interface.patch b/0007-fix-kiran-session-guard-fits-the-Qt5.9.7-interface.patch index 0bc00b9..b5220a1 100644 --- a/0007-fix-kiran-session-guard-fits-the-Qt5.9.7-interface.patch +++ b/0007-fix-kiran-session-guard-fits-the-Qt5.9.7-interface.patch @@ -1,7 +1,7 @@ From af28157ad311c38ab8990b1abd2b1a3041c65a22 Mon Sep 17 00:00:00 2001 From: niko_yhc Date: Tue, 12 Sep 2023 19:20:14 +0800 -Subject: [PATCH] fix(kiran-session-guard):fits the Qt5.9.7 interface +Subject: [PATCH 7/7] fix(kiran-session-guard):fits the Qt5.9.7 interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0008-fix-styleditemdelegate-updateEditorGeometry-to-updat.patch b/0008-fix-styleditemdelegate-updateEditorGeometry-to-updat.patch index 4abcd1f..7a0eed7 100644 --- a/0008-fix-styleditemdelegate-updateEditorGeometry-to-updat.patch +++ b/0008-fix-styleditemdelegate-updateEditorGeometry-to-updat.patch @@ -1,8 +1,8 @@ From 66d11ae4717a846e06a7fc85354993ba2e90ce0e Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Thu, 26 Oct 2023 14:40:23 +0800 -Subject: [PATCH] fix(styleditemdelegate): updateEditorGeometry to update the - wrong size of ItemWidgets in QStyledItemDelegate +Subject: [PATCH 08/10] fix(styleditemdelegate): updateEditorGeometry to update + the wrong size of ItemWidgets in QStyledItemDelegate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -114,5 +114,5 @@ index b83efdf..e59fa8b 100644 ui->userList->setSelectionBehavior(QAbstractItemView::SelectRows); ui->userList->setSelectionMode(QAbstractItemView::SingleSelection); -- -2.33.0 +2.27.0 diff --git a/0009-fix-autologin-timeout-Fix-issues-caused-by-automatic.patch b/0009-fix-autologin-timeout-Fix-issues-caused-by-automatic.patch new file mode 100644 index 0000000..afb73a9 --- /dev/null +++ b/0009-fix-autologin-timeout-Fix-issues-caused-by-automatic.patch @@ -0,0 +1,135 @@ +From 833ef45aa88677c2b91643d9893479b3b9dcb07c Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 9 Jan 2024 11:13:53 +0800 +Subject: [PATCH 09/10] fix(autologin-timeout): Fix issues caused by automatic + login timeout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复自动登录超时时间导致的问题 + +Closes #25015 +--- + src/lightdm-greeter/frame.cpp | 70 +++++++++++++++++++++++++++++++++-- + src/lightdm-greeter/frame.h | 1 + + 2 files changed, 68 insertions(+), 3 deletions(-) + +diff --git a/src/lightdm-greeter/frame.cpp b/src/lightdm-greeter/frame.cpp +index beb5ae5..3d8dada 100644 +--- a/src/lightdm-greeter/frame.cpp ++++ b/src/lightdm-greeter/frame.cpp +@@ -155,7 +155,7 @@ void Frame::initMenus() + // clang-format off + connect(itemWidget, &GreeterMenuItem::sigChecked, [this](QString action){ + m_specifiedSession = action; +- m_sessionMenu->hide(); ++ m_sessionMenu->hide(); + }); + // clang-format on + } +@@ -316,6 +316,7 @@ void Frame::initAuth() + { + AuthLightdm* auth = new AuthLightdm(m_greeter); + LoginFrame::initAuth(auth); ++ connect(m_greeter.data(),&QLightDM::Greeter::autologinTimerExpired,this,&Frame::onAutoLoginTimeout); + } + + void Frame::initConnection() +@@ -325,8 +326,8 @@ void Frame::initConnection() + connect(m_userList, &UserList::userCountChanged, this, &Frame::onUserListUserCountChanged); + connect(m_userList, &UserList::userRemoved,this,&Frame::onUserListUserRemoved); + connect(m_btnLoginOther, &QToolButton::clicked, this, &Frame::onLoginOtherClicked); +- connect(m_btnAutoLogin, &LoginButton::sigClicked, [this](){ +- startAuthUser(m_userName); ++ connect(m_btnAutoLogin, &LoginButton::sigClicked, [this](){ ++ startAuthUser(m_userName); + }); + // clang-format on + } +@@ -497,6 +498,69 @@ void Frame::onLoginOtherClicked() + break; + } + } ++ ++static bool getIsLoggedIn(const QString& userName) ++{ ++ bool res = false; ++ ++ QDBusInterface dmInterface("org.freedesktop.DisplayManager", ++ "/org/freedesktop/DisplayManager", ++ "org.freedesktop.DisplayManager", ++ QDBusConnection::systemBus()); ++ QVariant sessionsVar = dmInterface.property("Sessions"); ++ if (!sessionsVar.isValid()) ++ { ++ KLOG_ERROR("can't get display manager property 'sessions'"); ++ return res; ++ } ++ ++ QList sessions = sessionsVar.value>(); ++ KLOG_DEBUG() << "sessions:" << sessions.count(); ++ for (const auto& session : sessions) ++ { ++ KLOG_DEBUG() << "\t-" << session.path(); ++ } ++ foreach (const auto& session, sessions) ++ { ++ QDBusInterface sessionInterface("org.freedesktop.DisplayManager", ++ session.path(), ++ "org.freedesktop.DisplayManager.Session", ++ QDBusConnection::systemBus()); ++ QVariant userNameVar = sessionInterface.property("UserName"); ++ if (!userNameVar.isValid()) ++ { ++ KLOG_ERROR("can't get display manager session property 'UserName'"); ++ continue; ++ } ++ ++ QString sessionUser = userNameVar.toString(); ++ if (sessionUser.compare(userName) == 0) ++ { ++ res = true; ++ break; ++ } ++ } ++ ++ return res; ++} ++ ++void Frame::onAutoLoginTimeout() ++{ ++ if (m_greeter->autologinUserHint().isEmpty()) ++ { ++ return; ++ } ++ ++ // NOTE:修复#52982问题,若自动登录用户已存在不自动触发延时自动登录 ++ bool isLogged = getIsLoggedIn(m_greeter->autologinUserHint()); ++ if (isLogged) ++ { ++ return; ++ } ++ ++ startAuthUser(m_greeter->autologinUserHint()); ++} ++ + } // namespace Greeter + } // namespace SessionGuard + } // namespace Kiran +\ No newline at end of file +diff --git a/src/lightdm-greeter/frame.h b/src/lightdm-greeter/frame.h +index 73a3532..88e51ef 100644 +--- a/src/lightdm-greeter/frame.h ++++ b/src/lightdm-greeter/frame.h +@@ -72,6 +72,7 @@ private slots: + void onUserListUserCountChanged(int oldCount, int newCount); + void onUserListUserRemoved(const QString& name); + void onLoginOtherClicked(); ++ void onAutoLoginTimeout(); + + private: + Prefs* m_prefs; +-- +2.27.0 + diff --git a/0010-fix-scale-Fix-the-issue-of-manual-scaling-not-taking.patch b/0010-fix-scale-Fix-the-issue-of-manual-scaling-not-taking.patch new file mode 100644 index 0000000..ff8a990 --- /dev/null +++ b/0010-fix-scale-Fix-the-issue-of-manual-scaling-not-taking.patch @@ -0,0 +1,41 @@ +From c0759f25c4ebf2ed76ccd602458ea24817a4f0a3 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 9 Jan 2024 11:45:00 +0800 +Subject: [PATCH 10/10] fix(scale): Fix the issue of manual scaling not taking + effect +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 将设置缩放率代码提前至Application构造前 + +Closes #25011 +--- + src/lightdm-greeter/main.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/lightdm-greeter/main.cpp b/src/lightdm-greeter/main.cpp +index 49911d6..61255ec 100644 +--- a/src/lightdm-greeter/main.cpp ++++ b/src/lightdm-greeter/main.cpp +@@ -119,13 +119,13 @@ int main(int argc, char* argv[]) + qWarning() << "init kiran-log failed"; + } + +- QApplication app(argc, argv); +- QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); +- + Prefs::globalInit(); + auto prefs = Prefs::getInstance(); +- + adjustScaleFactor(prefs); ++ ++ QApplication app(argc, argv); ++ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); ++ + setCursor(prefs); + loadTranslator(); + loadStyleSheet(); +-- +2.27.0 + diff --git a/0011-fix-login-background-Add-login-background-setting-ti.patch b/0011-fix-login-background-Add-login-background-setting-ti.patch new file mode 100644 index 0000000..cb64c99 --- /dev/null +++ b/0011-fix-login-background-Add-login-background-setting-ti.patch @@ -0,0 +1,163 @@ +From a1615021c9e2c89558338108755420077e6658e1 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Thu, 18 Jan 2024 17:15:12 +0800 +Subject: [PATCH] fix(login background): Add login background setting title +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 添加登录背景设置标题 + +Closes #25063 +--- + .../kiran-cpanel-greeter/setting-window.cpp | 9 +++- + translations/kiran-cpanel-greeter.zh_CN.ts | 43 +++++++++++-------- + 2 files changed, 31 insertions(+), 21 deletions(-) + +diff --git a/src/lightdm-greeter/kiran-cpanel-greeter/setting-window.cpp b/src/lightdm-greeter/kiran-cpanel-greeter/setting-window.cpp +index 921e27c..5c3fd15 100644 +--- a/src/lightdm-greeter/kiran-cpanel-greeter/setting-window.cpp ++++ b/src/lightdm-greeter/kiran-cpanel-greeter/setting-window.cpp +@@ -154,7 +154,7 @@ QWidget *SettingWindow::initPageAutoLogin() + auto pageAutoLogin = new QWidget(this); + + auto mainLayout = new QVBoxLayout(pageAutoLogin); +- mainLayout->setContentsMargins(12, 24, 12, 0); ++ mainLayout->setContentsMargins(16, 16, 16, 0); + mainLayout->setSpacing(0); + + /* 自动登录用户总开关 */ +@@ -263,11 +263,16 @@ QWidget *SettingWindow::initPageGeneralSettings() + { + auto pageGeneralSettings = new QWidget(this); + auto mainLayout = new QVBoxLayout(pageGeneralSettings); +- mainLayout->setContentsMargins(12, 24, 12, 0); ++ mainLayout->setContentsMargins(16, 16, 16, 0); + mainLayout->setSpacing(0); + + /* 外观设置 */ + /* 图片选择控件 */ ++ auto titleLabel = new QLabel(this); ++ titleLabel->setText(tr("login background setting")); ++ mainLayout->addWidget(titleLabel); ++ mainLayout->addSpacerItem(new QSpacerItem(10,10,QSizePolicy::Minimum,QSizePolicy::Fixed)); ++ + m_imageSelector = new KiranImageSelector(this); + m_imageSelector->setFixedHeight(148); + mainLayout->addWidget(m_imageSelector); +diff --git a/translations/kiran-cpanel-greeter.zh_CN.ts b/translations/kiran-cpanel-greeter.zh_CN.ts +index fbe76f5..5468e6f 100644 +--- a/translations/kiran-cpanel-greeter.zh_CN.ts ++++ b/translations/kiran-cpanel-greeter.zh_CN.ts +@@ -110,84 +110,89 @@ Select discard to discard the modification and reload the new configuration + + +- ++ + Save + 保存 + + + +- ++ + Reset + 重置 + + +- ++ ++ login background setting ++ 登录背景设置 ++ ++ ++ + Scale Mode + 缩放模式 + + +- ++ + auto + 自动 + + +- ++ + manual + 手动 + + +- ++ + disable + 禁用 + + +- ++ + Scale Factor + 缩放比例 + + +- ++ + Enable manual input user login + 允许手动输入用户名登录 + + +- ++ + Show User List + 显示用户列表 + + +- +- ++ ++ + Configuration changed + 配置已改变 + + +- +- ++ ++ + The external configuration file has changed + If you choose to save, all external changes will be overwritten + Select discard to discard the modification and reload the new configuration + 配置文件已被修改,如果继续保存所有额外的修改将会被覆盖,选择丢弃将丢弃所有的修改并重新加载新的配置文件 + + +- +- ++ ++ + Save failed, reload + 保存失败,已重新加载 + + +- +- ++ ++ + Saved successfully + 保存成功 + + +- ++ + Save failed: %1 + 保存失败: %1 + + +- ++ + Please ensure that one of the two options is turned on! + 请确保两个选项之一被打开! + +-- +2.33.0 + diff --git a/kiran-session-guard.spec b/kiran-session-guard.spec index 3964b28..a028333 100644 --- a/kiran-session-guard.spec +++ b/kiran-session-guard.spec @@ -1,6 +1,6 @@ Name: kiran-session-guard Version: 2.5.1 -Release: 7 +Release: 9%{?dist} Summary: Kiran desktop environment login and lock screen dialog Summary(zh_CN): Kiran桌面环境登录和解锁框 @@ -15,7 +15,9 @@ Patch0005: 0005-fix-avatar-Update-authentication-users-and-user-list.patch Patch0006: 0006-fix-compile-warning-Fixed-some-compilation-warnings.patch Patch0007: 0007-fix-kiran-session-guard-fits-the-Qt5.9.7-interface.patch Patch0008: 0008-fix-styleditemdelegate-updateEditorGeometry-to-updat.patch - +Patch0009: 0009-fix-autologin-timeout-Fix-issues-caused-by-automatic.patch +Patch0010: 0010-fix-scale-Fix-the-issue-of-manual-scaling-not-taking.patch +Patch0011: 0011-fix-login-background-Add-login-background-setting-ti.patch %define SHOW_VIRTUAL_KEYBOARD 0 @@ -153,15 +155,23 @@ gtk-update-icon-cache -f /usr/share/icons/hicolor/ rm -rf %{buildroot} %changelog -* Thu Oct 26 2023 liuxinhao - 2.5.1-7 -- KYOS-F: fix updateEditorGeometry to update the wrong size of ItemWidgets in QStyledItemDelegate(#16513) +* Thu Jan 18 2024 liuxinhao - 2.5.1-9 +- KYOS-B: fix the issue of manual scaling not taking effect(#25011) +- KYOS-B: fix issues caused by automatic login timeout(#25015) +- KYOS-B: add login background settings title(#25063) -* Tue Sep 12 2023 yinhongchang - 2.5.1-6 +* Thu Oct 26 2023 liuxinhao - 2.5.1-7.kb1 +- KYOS-B: fix updateEditorGeometry to update the wrong size of ItemWidgets in QStyledItemDelegate(#16513) + +* Tue Sep 12 2023 yinhongchang - 2.5.1-6.kb1 - KYOS-F: fits the Qt5.9.7 interface(#15019) -* Tue Aug 22 2023 liuxinhao - 2.5.1-5 +* Tue Aug 22 2023 liuxinhao - 2.5.1-5.kb1 - KYOS-B: update authentication users and user list avatars(#12711) +* Fri Jun 16 2023 kpkg - 2.5.1-4.kb1 +- rebuild for KiranUI-2.5-next + * Tue Jun 13 2023 liuxinhao - 2.5.1-4 - KYOS-B: fix the crash caused by the exit slot not being disconnected in time - KYOS-B fix SIGTERM processing where there may be blocking in the X event(#I79MO4)