8295006: Colored text is not shown on disabled checkbox and radio button with GTK LAF for bug4314194.

Reviewed-by: prr, tr
This commit is contained in:
Abhishek Kumar 2022-12-01 08:07:22 +00:00 committed by Jayathirth D V
parent 756dd5bb0d
commit ce048e7cb5
2 changed files with 12 additions and 1 deletions
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk
test/jdk

@ -286,6 +286,18 @@ class GTKStyle extends SynthStyle implements GTKConstants {
}
}
}
if ((c instanceof JCheckBox) && (state & SynthConstants.DISABLED) != 0) {
if (UIManager.getColor("CheckBox.disabledText") != null) {
return UIManager.getColor("CheckBox.disabledText");
}
} else if ((c instanceof JRadioButton) &&
(state & SynthConstants.DISABLED) != 0) {
if (UIManager.getColor("RadioButton.disabledText") != null) {
return UIManager.getColor("RadioButton.disabledText");
}
}
return getColorForState(context, type);
}

@ -662,7 +662,6 @@ javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all,linux-all
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765 macosx-all,linux-all
javax/swing/JEditorPane/6917744/bug6917744.java 8213124 macosx-all
javax/swing/JRadioButton/4314194/bug4314194.java 8295006 linux-all
# Several tests which fail on some hidpi systems/macosx12-aarch64 system
java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64