nix-stuff/roles/kde/patches/plasma-workspace/pr5746.patch
2025-09-19 18:00:15 +02:00

33 lines
1.3 KiB
Diff

From f6ec2847358178a5b6ff0497e52d1e2be43d2a48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luan=20Vitor=20Simi=C3=A3o=20oliveira?=
<luanv.oliveira@outlook.com>
Date: Fri, 8 Aug 2025 14:41:49 -0300
Subject: [PATCH] kcms/style: add special case for Adwaita gtk theme
Allows the user to set the GTK theme to the default "Adwaita"
needs to be special cased because the theme is implemented in code.
---
kcms/style/gtkthemesmodel.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kcms/style/gtkthemesmodel.cpp b/kcms/style/gtkthemesmodel.cpp
index 002e87dbd0d..6dcdf4f1a1d 100644
--- a/kcms/style/gtkthemesmodel.cpp
+++ b/kcms/style/gtkthemesmodel.cpp
@@ -35,7 +35,12 @@ void GtkThemesModel::load()
if (possibleThemeDirectory.dirName() == u"Breeze-Dark") {
continue;
}
-
+ if (possibleThemeDirectory.dirName() == u"Default") {
+ // Adwaita is a special case, since it is implemented inside GTK itself
+ // also setting gtk-theme-name to "Default" breaks dark theme
+ gtk3ThemesNames.insert(QStringLiteral("Adwaita"), possibleThemeDirectory.path());
+ continue;
+ }
gtk3ThemesNames.insert(possibleThemeDirectory.dirName(), possibleThemeDirectory.path());
}
}
--
GitLab