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

Sergey Bylokhov serb at openjdk.org
Thu Oct 20 08:54:54 UTC 2022


On Wed, 19 Oct 2022 07:13:44 GMT, Abhishek Kumar <duke at openjdk.org> 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

The current change mostly replicates the previous fix in Nimbus L&F. Since that fix is questionable we should rethink it first. The open questions are:
 - Why did the Nimbus properties above stop working in 20
 - Why the "[Disabled]" does not work as expected
 - Why Nimbus should honor "CheckBox.disabledText" property and not [these](https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html) properties
 
After that we can answer the next question: "what property GTK L&F should honor". The GTK implementation is based on SynthContext/SynthStyle so I assume it should use the same props as Nimbus, and provide a way to override it by the user when needed(same as Nimbus).

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

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



More information about the client-libs-dev mailing list