diff --git a/time-shutdown-4.0.0.0-resolve-the-issue-of-reversed-fonts-in-the-Qidian-theme.patch b/time-shutdown-4.0.0.0-resolve-the-issue-of-reversed-fonts-in-the-Qidian-theme.patch new file mode 100644 index 0000000000000000000000000000000000000000..830e99bda49ae9b74eac4f274d58f7cc4d52632a --- /dev/null +++ b/time-shutdown-4.0.0.0-resolve-the-issue-of-reversed-fonts-in-the-Qidian-theme.patch @@ -0,0 +1,66 @@ +From 3beb942d97ad17ff4704ad4f0d4dc5c7cda0dd67 Mon Sep 17 00:00:00 2001 +From: huayadong +Date: Tue, 19 Nov 2024 21:02:10 +0800 +Subject: [PATCH] resolve the issue of reversed fonts in the Qidian theme + +--- + time-shutdown/dropdownmenu.cpp | 16 +++++++++++++++- + time-shutdown/dropdownmenu.h | 1 + + 2 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/time-shutdown/dropdownmenu.cpp b/time-shutdown/dropdownmenu.cpp +index 8cd8364..d4087d6 100644 +--- a/time-shutdown/dropdownmenu.cpp ++++ b/time-shutdown/dropdownmenu.cpp +@@ -62,7 +62,14 @@ MenuItem::MenuItem(QString week, int id, QWidget *parent) : QToolButton(parent), + m_darkTheme = false; + } + } +- connect(m_style, &QGSettings::changed, this, [=](const QString & key) { ++ ++ if (m_style->keys().contains("widgetThemeName")) { ++ if (m_style->get("widgetThemeName").toString() == "classical") { ++ m_classTheme = true; ++ } ++ } ++ ++ connect(m_style, &QGSettings::changed, this, [=](const QString &key) { + if (key == "styleName") { + setItemStyle(); + if (m_style->get("styleName").toString() == "ukui-dark") { +@@ -77,6 +84,10 @@ MenuItem::MenuItem(QString week, int id, QWidget *parent) : QToolButton(parent), + m_pweekLabel->setPalette(palette); + } + } ++ ++ if (key == "widgetThemeName") { ++ m_classTheme = m_style->get("widgetThemeName").toString() == "classical"; ++ } + }); + } + } +@@ -113,6 +124,9 @@ void MenuItem::mouseReleaseEvent(QMouseEvent *event) + void MenuItem::enterEvent(QEvent *e) + { + Q_UNUSED(e); ++ if (m_classTheme) { ++ return QToolButton::enterEvent(e); ++ } + QApplication::postEvent(m_pselectedLabelIcon, new QEvent(QEvent::Enter)); + + QPalette palette; +diff --git a/time-shutdown/dropdownmenu.h b/time-shutdown/dropdownmenu.h +index a9a75bc..79106de 100644 +--- a/time-shutdown/dropdownmenu.h ++++ b/time-shutdown/dropdownmenu.h +@@ -42,6 +42,7 @@ public: + QLabel *m_pselectedLabelIcon; + QHBoxLayout *m_pHWeekLayout; + bool m_darkTheme = false; ++ bool m_classTheme = false; + int m_id = 0; + + void setIconVisible(bool status); +-- +2.46.0 + diff --git a/time-shutdown.spec b/time-shutdown.spec index 56b7f58fbb5f7c29669592b045a72cb351cf4733..1afc9fc69508cec8afc9cd10cc2461a636603fbd 100644 --- a/time-shutdown.spec +++ b/time-shutdown.spec @@ -1,12 +1,14 @@ Name: time-shutdown Version: 4.0.0.0 -Release: 1 +Release: 2 Summary: The time-shutdown is mainly used in the desktop operating system License: GPL-3+ URL: https://github.com/ukui/time-shutdown Source0: %{name}-%{version}.tar.gz +Patch1: time-shutdown-4.0.0.0-resolve-the-issue-of-reversed-fonts-in-the-Qidian-theme.patch + BuildRequires: glib2-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel @@ -50,6 +52,9 @@ popd %{_datadir}/ukui-time-shutdown/translations %changelog +* Thu Nov 21 2024 huayadong - 4.0.0.0-2 +- add Patch1:time-shutdown-4.0.0.0-resolve-the-issue-of-reversed-fonts-in-the-Qidian-theme.patch + * Mon Apr 08 2024 peijiankang - 4.0.0.0-1 - update version to 4.0.0.0 from openkylin