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
Pick-to: 6.5
Change-Id: Ic227029f2d366aa826e7bf1c3870428e3b638638
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Axel Spoerl 2022-12-16 11:37:34 +01:00
parent 2acd007859
commit 2c9b7a986d

View File

@ -377,7 +377,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);
@ -391,7 +390,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);
@ -427,6 +425,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);