On Tue, 5 Mar 2024 05:28:01 GMT, Abhishek Kumar <[email protected]> wrote:

>> JLabel text is not painted with the LAF defined foreground color in GTK LAF. 
>> In GTK LAF the foreground color is retrieved by using native system APIs. 
>> Fix is to return the foreground color if it is set by LAF defined property 
>> otherwise return the default color by calling native APIs.
>> Applet based test has been converted to automatic test and check for all 
>> installed LAFs. CI testing is green for test suite and individual test. Link 
>> attached in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   separate method to get LAF defined color

@aivanov-jdk 

> This looks weird… So you're saying Label[Enabled].textForeground and 
> Label[Disabled].textForeground are used for Nimbus (and Synth and GTK) 
> instead of Label.foreground and Label.disabledForeground which are used for 
> other L&Fs.

As per my understanding, Yes, for Nimbus LAF the UI properties are different 
than other LAF.

> Shouldn't we fix the problem by correcting the keys instead? It looks like 
> it's what you're doing for specific components.

I am not sure if it is a problem or nimbus LAF is supposed to be like this.

> Is it specified anywhere that Synth-based L&Fs use different constants? It 
> results in incorrect colors.

Need to check on this.

> If a developer sets the common properties, should they override Look-and-Feel 
> defaults?

Will check and revert back.

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

PR Comment: https://git.openjdk.org/jdk/pull/17763#issuecomment-2019571589

Reply via email to