From 80f840985c0a7ed550972b48665fd762b6e0bf3d Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 15 May 2023 14:50:22 +0200 Subject: [PATCH 1/4] KIconTheme: allow to also fallback to breeze-dark when set through QPA --- kf5-kiconthemes.spec | 6 +- ...-to-breeze-dark-when-set-through-qpa.patch | 60 +++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch diff --git a/kf5-kiconthemes.spec b/kf5-kiconthemes.spec index d5f3968..3b3993e 100644 --- a/kf5-kiconthemes.spec +++ b/kf5-kiconthemes.spec @@ -2,7 +2,7 @@ Name: kf5-%{framework} Version: 5.105.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 3 integration module with icon themes License: LGPLv2+ and GPLv2+ @@ -13,6 +13,7 @@ URL: https://api.kde.org/frameworks/kiconthemes/ Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz ## upstream patches +Patch0: kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch ## upstreamable patches @@ -81,6 +82,9 @@ developing applications that use %{name}. %changelog +* Mon May 15 2023 Jan Grulich - 5.105.0-2 +- KIconTheme: allow to also fallback to breeze-dark when set through QPA + * Sun Apr 02 2023 Marc Deop i Argemí - 5.105.0-1 - 5.105.0 diff --git a/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch b/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch new file mode 100644 index 0000000..df0516f --- /dev/null +++ b/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch @@ -0,0 +1,60 @@ +From c2efa3e48e8de13e4fd5d35bd1a3ae961b8ec9c7 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Mon, 15 May 2023 13:11:58 +0200 +Subject: [PATCH] KIconTheme: allow to also fallback to Breeze-dark when set + through QPA + +KIconTheme always fallbacks to Breeze icon theme in order to make sure +KDE apps are not missing icons on other desktops, like GNOME. Problem is +that we always fallback to the light variant of Breeze, which will have +icons that are barely visible when applications are using dark theme. +This change checks fallback icon theme set through QPlatformTheme, like +QGnomePlatform which can fallback to correct Breeze variant depending on +the used system theme. +--- + src/kicontheme.cpp | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/src/kicontheme.cpp b/src/kicontheme.cpp +index bf3e2b64..c05094b8 100644 +--- a/src/kicontheme.cpp ++++ b/src/kicontheme.cpp +@@ -26,6 +26,9 @@ + #include + #include + ++#include ++#include ++ + #include + + #include +@@ -60,13 +63,25 @@ void initRCCIconTheme() + } + Q_COREAPP_STARTUP_FUNCTION(initRCCIconTheme) + +-// Set the icon theme fallback to breeze ++// Set the icon theme fallback to breeze and/or to breeze-dark ++// in case it has been set as system fallback icon theme. + // Most of our apps use "lots" of icons that most of the times + // are only available with breeze, we still honour the user icon + // theme but if the icon is not found there, we go to breeze + // since it's almost sure it'll be there + static void setBreezeFallback() + { ++ if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { ++ const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconFallbackThemeName); ++ if (themeHint.isValid()) { ++ const QString theme = themeHint.toString(); ++ if (theme.toLower().contains("breeze")) { ++ QIcon::setFallbackThemeName(theme); ++ return; ++ } ++ } ++ } ++ + QIcon::setFallbackThemeName(QStringLiteral("breeze")); + } + +-- +GitLab From 79ba066c6c65841c139a20d6d57a7042d8c14267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Deop=20i=20Argem=C3=AD?= Date: Mon, 15 May 2023 21:55:25 +0200 Subject: [PATCH 2/4] 5.106.0 --- .gitignore | 1 + kf5-kiconthemes.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dec4fda..d9385ec 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /kiconthemes-5.103.0.tar.xz /kiconthemes-5.104.0.tar.xz /kiconthemes-5.105.0.tar.xz +/kiconthemes-5.106.0.tar.xz diff --git a/kf5-kiconthemes.spec b/kf5-kiconthemes.spec index 3b3993e..cb4f14d 100644 --- a/kf5-kiconthemes.spec +++ b/kf5-kiconthemes.spec @@ -1,8 +1,8 @@ %global framework kiconthemes Name: kf5-%{framework} -Version: 5.105.0 -Release: 2%{?dist} +Version: 5.106.0 +Release: 1%{?dist} Summary: KDE Frameworks 5 Tier 3 integration module with icon themes License: LGPLv2+ and GPLv2+ @@ -82,6 +82,9 @@ developing applications that use %{name}. %changelog +* Mon May 15 2023 Marc Deop i Argemí - 5.106.0-1 +- 5.106.0 + * Mon May 15 2023 Jan Grulich - 5.105.0-2 - KIconTheme: allow to also fallback to breeze-dark when set through QPA diff --git a/sources b/sources index 0857789..91f5fe5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kiconthemes-5.105.0.tar.xz) = e07a9eede434679eb86e9f5ac44c1896706e681ac913d15ec6cd25efa0332f8d044b2edd6fb85fbfa40c427796d36379a4294491d1b5b037818a298eea081f9b +SHA512 (kiconthemes-5.106.0.tar.xz) = efcb0983af25d0fe0488f69ab2152a79ece0fd5f4643381770a95b4297b159a4606deab4c8ead7dd8a5f9f5805b5f116853e24f1d7295dd7eca9e292fe1a150d From 4821b6499c0f918ab8d152b041372eb9406a3382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Deop=20i=20Argem=C3=AD?= Date: Sat, 3 Jun 2023 15:29:21 +0200 Subject: [PATCH 3/4] 5.107.0 --- .gitignore | 1 + kf5-kiconthemes.spec | 6 +- ...-to-breeze-dark-when-set-through-qpa.patch | 60 ------------------- sources | 2 +- 4 files changed, 6 insertions(+), 63 deletions(-) delete mode 100644 kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch diff --git a/.gitignore b/.gitignore index d9385ec..a03416d 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ /kiconthemes-5.104.0.tar.xz /kiconthemes-5.105.0.tar.xz /kiconthemes-5.106.0.tar.xz +/kiconthemes-5.107.0.tar.xz diff --git a/kf5-kiconthemes.spec b/kf5-kiconthemes.spec index cb4f14d..63d3c8b 100644 --- a/kf5-kiconthemes.spec +++ b/kf5-kiconthemes.spec @@ -1,7 +1,7 @@ %global framework kiconthemes Name: kf5-%{framework} -Version: 5.106.0 +Version: 5.107.0 Release: 1%{?dist} Summary: KDE Frameworks 5 Tier 3 integration module with icon themes @@ -13,7 +13,6 @@ URL: https://api.kde.org/frameworks/kiconthemes/ Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz ## upstream patches -Patch0: kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch ## upstreamable patches @@ -82,6 +81,9 @@ developing applications that use %{name}. %changelog +* Sat Jun 03 2023 Marc Deop i Argemí - 5.107.0-1 +- 5.107.0 + * Mon May 15 2023 Marc Deop i Argemí - 5.106.0-1 - 5.106.0 diff --git a/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch b/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch deleted file mode 100644 index df0516f..0000000 --- a/kicontheme-allow-to-also-fallback-to-breeze-dark-when-set-through-qpa.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c2efa3e48e8de13e4fd5d35bd1a3ae961b8ec9c7 Mon Sep 17 00:00:00 2001 -From: Jan Grulich -Date: Mon, 15 May 2023 13:11:58 +0200 -Subject: [PATCH] KIconTheme: allow to also fallback to Breeze-dark when set - through QPA - -KIconTheme always fallbacks to Breeze icon theme in order to make sure -KDE apps are not missing icons on other desktops, like GNOME. Problem is -that we always fallback to the light variant of Breeze, which will have -icons that are barely visible when applications are using dark theme. -This change checks fallback icon theme set through QPlatformTheme, like -QGnomePlatform which can fallback to correct Breeze variant depending on -the used system theme. ---- - src/kicontheme.cpp | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/kicontheme.cpp b/src/kicontheme.cpp -index bf3e2b64..c05094b8 100644 ---- a/src/kicontheme.cpp -+++ b/src/kicontheme.cpp -@@ -26,6 +26,9 @@ - #include - #include - -+#include -+#include -+ - #include - - #include -@@ -60,13 +63,25 @@ void initRCCIconTheme() - } - Q_COREAPP_STARTUP_FUNCTION(initRCCIconTheme) - --// Set the icon theme fallback to breeze -+// Set the icon theme fallback to breeze and/or to breeze-dark -+// in case it has been set as system fallback icon theme. - // Most of our apps use "lots" of icons that most of the times - // are only available with breeze, we still honour the user icon - // theme but if the icon is not found there, we go to breeze - // since it's almost sure it'll be there - static void setBreezeFallback() - { -+ if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { -+ const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconFallbackThemeName); -+ if (themeHint.isValid()) { -+ const QString theme = themeHint.toString(); -+ if (theme.toLower().contains("breeze")) { -+ QIcon::setFallbackThemeName(theme); -+ return; -+ } -+ } -+ } -+ - QIcon::setFallbackThemeName(QStringLiteral("breeze")); - } - --- -GitLab diff --git a/sources b/sources index 91f5fe5..48330fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kiconthemes-5.106.0.tar.xz) = efcb0983af25d0fe0488f69ab2152a79ece0fd5f4643381770a95b4297b159a4606deab4c8ead7dd8a5f9f5805b5f116853e24f1d7295dd7eca9e292fe1a150d +SHA512 (kiconthemes-5.107.0.tar.xz) = f7d030a701ea47def5ddbda4f41570940e5e03a21e27dd16cc8e2a046b76bc82ed65cd700e97f35e3ba1788fe003a57f65808c6285969dd244fd80c05b543083 From d058366e3b97ec927c775f33dcd5e1c3001bd8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Deop=20i=20Argem=C3=AD?= Date: Sun, 2 Jul 2023 19:32:20 +0200 Subject: [PATCH 4/4] 5.108.0 --- .gitignore | 1 + kf5-kiconthemes.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a03416d..c3ff656 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /kiconthemes-5.105.0.tar.xz /kiconthemes-5.106.0.tar.xz /kiconthemes-5.107.0.tar.xz +/kiconthemes-5.108.0.tar.xz diff --git a/kf5-kiconthemes.spec b/kf5-kiconthemes.spec index 63d3c8b..0a9fca2 100644 --- a/kf5-kiconthemes.spec +++ b/kf5-kiconthemes.spec @@ -1,7 +1,7 @@ %global framework kiconthemes Name: kf5-%{framework} -Version: 5.107.0 +Version: 5.108.0 Release: 1%{?dist} Summary: KDE Frameworks 5 Tier 3 integration module with icon themes @@ -81,6 +81,9 @@ developing applications that use %{name}. %changelog +* Sun Jul 02 2023 Marc Deop i Argemí - 5.108.0-1 +- 5.108.0 + * Sat Jun 03 2023 Marc Deop i Argemí - 5.107.0-1 - 5.107.0 diff --git a/sources b/sources index 48330fc..c7b2091 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kiconthemes-5.107.0.tar.xz) = f7d030a701ea47def5ddbda4f41570940e5e03a21e27dd16cc8e2a046b76bc82ed65cd700e97f35e3ba1788fe003a57f65808c6285969dd244fd80c05b543083 +SHA512 (kiconthemes-5.108.0.tar.xz) = 5840044402d7ccfc903cc8ace679e4169fe494cb3248e603a827ae228bc80e40b4c530b7bdf5b45edb18cd98edab8112c74b0c96e6f9e15947f0561fa5980be6