Skip to content

Commit

Permalink
8295006: Colored text is not shown on disabled checkbox and radio but…
Browse files Browse the repository at this point in the history
…ton with GTK LAF for bug4314194.

Reviewed-by: prr, tr
  • Loading branch information
Abhishek Kumar authored and jayathirthrao committed Dec 1, 2022
1 parent 756dd5b commit ce048e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,18 @@ else if (type == ColorType.TEXT_FOREGROUND) {
}
}
}

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);
}

Expand Down
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit ce048e7

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.