Skip to content

Commit ce048e7

Browse files
Abhishek Kumarjayathirthrao
Abhishek Kumar
authored andcommittedDec 1, 2022
8295006: Colored text is not shown on disabled checkbox and radio button with GTK LAF for bug4314194.
Reviewed-by: prr, tr
1 parent 756dd5b commit ce048e7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java

+12
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,18 @@ else if (type == ColorType.TEXT_FOREGROUND) {
286286
}
287287
}
288288
}
289+
290+
if ((c instanceof JCheckBox) && (state & SynthConstants.DISABLED) != 0) {
291+
if (UIManager.getColor("CheckBox.disabledText") != null) {
292+
return UIManager.getColor("CheckBox.disabledText");
293+
}
294+
} else if ((c instanceof JRadioButton) &&
295+
(state & SynthConstants.DISABLED) != 0) {
296+
if (UIManager.getColor("RadioButton.disabledText") != null) {
297+
return UIManager.getColor("RadioButton.disabledText");
298+
}
299+
}
300+
289301
return getColorForState(context, type);
290302
}
291303

‎test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
662662
javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all,linux-all
663663
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765 macosx-all,linux-all
664664
javax/swing/JEditorPane/6917744/bug6917744.java 8213124 macosx-all
665-
javax/swing/JRadioButton/4314194/bug4314194.java 8295006 linux-all
666665

667666
# Several tests which fail on some hidpi systems/macosx12-aarch64 system
668667
java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Dec 1, 2022

@openjdk-notifier[bot]
Please sign in to comment.