On Wed, 19 Oct 2022 07:13:44 GMT, Abhishek Kumar <[email protected]> wrote:

>> Existing test 
>> `open/test/jdk/javax/swing/JRadioButton/4314194/bug4314194.java` was not 
>> showing colored text for disabled checkbox and radiobutton in GTK LAF.
>> 
>> The fix is to get the disabled state color for checkbox and radiobutton from 
>> UIManager if it exists. 
>> 
>> Test case `open/test/jdk/javax/swing/JRadioButton/4314194/bug4314194.java` 
>> has been checked in CI pipeline. Link is attached in JBS.
>
> Abhishek Kumar has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains three commits:
> 
>  - ProblemList.txt file merge resolved
>  - 8295006 entry removed from problem lists
>  - Fix for disabled checkbox and radiobutton colored text

That text mention the Nimbus properties, which are different from the 
properties used in the test.
The next line should change the color globally:
UIManager.getDefaults().put("CheckBox[Enabled].textForeground", Color.RED);
But it is unclear why the next does not work
UIManager.getDefaults().put("CheckBox[Disabled].textForeground", Color.GREEN);

It is interesting that the next line works fine in 11 and 19, but does not work 
in 20.
UIManager.getDefaults().put("CheckBox.textForeground", Color.RED);
I think that previouse fixes should be updated.

The next line is also does not work in 20
UIManager.getDefaults().put("CheckBox[Enabled].textForeground", Color.GREEN);

-------------

PR: https://git.openjdk.org/jdk/pull/10755

Reply via email to