summaryrefslogtreecommitdiffstats
path: root/src/plugins/platformthemes
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2023-06-26 11:48:40 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2023-06-28 22:48:42 +0200
commit574a47dd5a89e7cecf4fbf592dd0d5b216c3b0a6 (patch)
tree9494994a64a226ea64655bcf542e607b34209b4c /src/plugins/platformthemes
parenta3ec70a92971342da0caf68e20c14ce16a0b39af (diff)
QGtk3Theme: Do not default Active WindowText to button foreground
QGtk3Theme uses the GTK button foreground as a default for the WindowText color role. When a GTK3 theme has no specific color for the entry text, this can lead to text on certain assets looking darker and thus disabled. This discontinues usage of the button foreground for the window text. Finding the WindowText color role in QPlatformTheme::SystemPalette now follows the following logic: (1) GTK normal entry text is used if specified. This is the preferred option, copying GTK behavior. (2) If (1) is not specified, the GTK default text color is used, making WindowText equal to Text. (3) If neither (1), nor (2) are specified, the WindowText color role is taken from qt_fusionPalette, where it is also equal to Text. The SystemPalette is used as a default template for all other control or widget speicific palettes. The rules above therefor apply to all screen assets (unless they use a JSON file to specify a their individual WindowText). [ChangeLog][QGtk3Theme][SystemPalette][WindowText] Default to GTK Entry Text / Normal Text / qt_fusionPalette Fixes: QTBUG-114600 Pick-to: 6.6 6.5.2 6.5 Change-Id: I4c96ac7d096526faf4c2feee436753990c6c9f92 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platformthemes')
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3storage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp
index 8d6f3a4c14..1952ce278c 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp
@@ -538,7 +538,6 @@ void QGtk3Storage::createMapping()
LIGHTER(Normal, Window, 80);
ADD(Normal, Dark);
GTK(button, Foreground, ACTIVE);
- ADD(Normal, WindowText);
ADD(Inactive, WindowText);
LIGHTER(Normal, WindowText, 50);
ADD(Disabled, Text);
@@ -562,6 +561,7 @@ void QGtk3Storage::createMapping()
ADD(Disabled, HighlightedText);
GTK(Default, Text, NORMAL);
ADD(Normal, Text);
+ ADD(Normal, WindowText);
ADD(Inactive, Text);
ADD(Normal, HighlightedText);
LIGHTER(Normal, Base, 93);