From 8f4b3f204c97e65514c1352445358c72170ae6b6 Mon Sep 17 00:00:00 2001 From: hewenfei Date: Fri, 3 Nov 2023 15:09:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E7=B3=BB=E7=BB=9F=E5=AD=97=E4=BD=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 5 ++- debian/patches/0001-fix.patch | 85 +++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 debian/patches/0001-fix.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index c4b7a15..200bd89 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -ukui-menu (4.0.0.9-ok0.1) yangtze; urgency=medium +ukui-menu (4.0.0.9-ok0.1build1) yangtze; urgency=medium * issue: #I72IIJ + * rebuild: 4.0.0.9-ok0.1 - -- hewenfei Tue, 07 Nov 2023 16:43:13 +0800 + -- hewenfei Fri, 08 Mar 2024 09:56:46 +0800 ukui-menu (4.0.0.9-ok0) yangtze; urgency=medium diff --git a/debian/patches/0001-fix.patch b/debian/patches/0001-fix.patch new file mode 100644 index 0000000..f7bd2f9 --- /dev/null +++ b/debian/patches/0001-fix.patch @@ -0,0 +1,85 @@ +From: hewenfei +Date: Fri, 3 Nov 2023 15:09:42 +0800 +Subject: =?utf-8?b?Zml4OiDkv67lpI3kuI3ot5/pmo/ns7vnu5/lrZfkvZPpl67popg=?= + +--- + qml/AppControls2/StyleText.qml | 10 +++++----- + src/uiconfig/theme-palette.cpp | 8 ++++++++ + src/uiconfig/theme-palette.h | 3 +++ + 3 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/qml/AppControls2/StyleText.qml b/qml/AppControls2/StyleText.qml +index de4b127..f549a81 100644 +--- a/qml/AppControls2/StyleText.qml ++++ b/qml/AppControls2/StyleText.qml +@@ -11,18 +11,18 @@ Text { + function updateColor() { + color = themePalette.paletteColorWithCustomTransparency(paletteRole, Palette.Active, alpha); + } +- function updateFontSize() { +- systemFontSize = themePalette.systemFontSize(); ++ function updateFont() { ++ font = themePalette.systemFont(); + } + Component.onCompleted: { + updateColor(); +- updateFontSize(); ++ updateFont(); + themePalette.styleColorChanged.connect(updateColor); +- themePalette.systemFontSizeChanged.connect(updateFontSize); ++ themePalette.systemFontChanged.connect(updateFont); + } + Component.onDestruction: { + themePalette.styleColorChanged.disconnect(updateColor); +- themePalette.systemFontSizeChanged.disconnect(updateFontSize); ++ themePalette.systemFontChanged.disconnect(updateFont); + } + onPaletteRoleChanged: { + updateColor(); +diff --git a/src/uiconfig/theme-palette.cpp b/src/uiconfig/theme-palette.cpp +index e687364..257d947 100644 +--- a/src/uiconfig/theme-palette.cpp ++++ b/src/uiconfig/theme-palette.cpp +@@ -42,6 +42,9 @@ ThemePalette::ThemePalette(QObject *parent) : QObject(parent) + connect(qGuiApp, &QGuiApplication::paletteChanged, this, [=] { + Q_EMIT styleColorChanged(); + }); ++ connect(qGuiApp, &QGuiApplication::fontChanged, this, [=] { ++ Q_EMIT systemFontChanged(); ++ }); + } + + QColor ThemePalette::paletteColor(Palette::ColorRole colorRole, Palette::ColorGroup colorGroup) const +@@ -222,3 +225,8 @@ qreal ThemePalette::systemFontSize() const + { + return m_fontSize; + } ++ ++QFont ThemePalette::systemFont() ++{ ++ return QGuiApplication::font(); ++} +diff --git a/src/uiconfig/theme-palette.h b/src/uiconfig/theme-palette.h +index 95272cb..54a4f13 100644 +--- a/src/uiconfig/theme-palette.h ++++ b/src/uiconfig/theme-palette.h +@@ -23,6 +23,7 @@ + + #include + #include ++#include + #include "settings.h" + + namespace UkuiMenu { +@@ -94,9 +95,11 @@ public: + Q_INVOKABLE QColor separator(Palette::ColorGroup colorGroup = Palette::Active) const; + + Q_INVOKABLE qreal systemFontSize() const; ++ Q_INVOKABLE QFont systemFont(); + + Q_SIGNALS: + void styleColorChanged(); ++ void systemFontChanged(); + void systemFontSizeChanged(); + + private Q_SLOTS: diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..bf09104 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-fix.patch