RFR: 8075917: The regression-swing case failed as the text on label is not painted red with the GTK L&F [v5]
Abhishek Kumar
abhiscxk at openjdk.org
Wed Apr 10 11:28:10 UTC 2024
On Tue, 5 Mar 2024 05:28:01 GMT, Abhishek Kumar <abhiscxk at openjdk.org> 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
In Nimbus and GTK LAF, these properties (foreground, background, font) are set via SynthStyle [installDefaults](https://github.com/kumarabhi006/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthStyle.java#L928) method where the foreground, background are set by getting the value from getColorForState method.
Moreover these properties (foreground, background, font) are not defined for Synth derived LAFs. One possible reason may be Nimbus properties are different from GTK (e.g. Label.foreground in GTK and Label[Enabled].textForeground in Nimbus).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17763#issuecomment-2047275612
More information about the client-libs-dev
mailing list