From 2b4ce4bc5a2a2816791d7b58d659f3a82cba6e43 Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Fri, 16 Dec 2022 11:37:34 +0100 Subject: [PATCH] Fix checkbox and radiobutton background in QGtk3Theme The background color for radio buttons and checkboxes was not correctly read from the current GTK3 theme in light mode. This has lead to identical colors for indicators and background of radio buttons and checkboxes for certain GTK themes (e.g. Breeze). This patch sets the GTK default foreground color to the base color of palettes for checkboxes and radio buttons. Fixes: QTBUG-109454 Change-Id: Ic227029f2d366aa826e7bf1c3870428e3b638638 Reviewed-by: Jonas Kvinge Reviewed-by: Shawn Rutledge (cherry picked from commit 2c9b7a986d08e8f9b858973a2ad479e1a83adb13) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platformthemes/gtk3/qgtk3storage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp index beecb859124..1319157f443 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3storage.cpp +++ b/src/plugins/platformthemes/gtk3/qgtk3storage.cpp @@ -530,7 +530,6 @@ void QGtk3Storage::createMapping() ADD(Normal, Button); ADD(Normal, Base); ADD(Inactive, Base); - ADD(Normal, Window); // redundant ADD(Inactive, Window); LIGHTER(Normal, Window, 125); ADD(Normal, Light); @@ -544,7 +543,6 @@ void QGtk3Storage::createMapping() LIGHTER(Normal, WindowText, 50); ADD(Disabled, Text); ADD(Disabled, WindowText); - //ADD(Normal, ButtonText); ADD(Inactive, ButtonText); GTK(button, Text, NORMAL); ADD(Disabled, ButtonText); @@ -580,6 +578,8 @@ void QGtk3Storage::createMapping() // Checkbox and Radio Button GTK(button, Text, ACTIVE); ADD(Normal, Base, Dark); + GTK(Default, Background, NORMAL); + ADD(All, Base); GTK(button, Text, NORMAL); ADD(Normal, Base, Light); SAVE(CheckBoxPalette);