On Fri, 13 Nov 2020 10:07:57 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> Well, even "white" was hardcoded till now...so I am not sure how can we read >> the color from native...do you have any idea? >> Even CsystemColors.m has all the color hardcoded >> sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor >> blackColor]; > > I dont think SystemColors are used in macos. I see in loadSystemColors() is > commented in AquaLookAndFeel.java, therefore > loadNativeColors() defined in LWCToolkit.m is not used. > Well, even "white" was hardcoded till now...so I am not sure how can we read > the color from native...do you have any idea? The usage of the hardcoded white color was a bug, and it was found by the JDK-8251377. It would be good to investigate how to read the color of the text in the JTabbedPane(Or probably that color is used in some other components as well) from the native. > I dont think SystemColors are used in macos. I see in loadSystemColors() is > commented in AquaLookAndFeel.java, therefore loadNativeColors() defined in > LWCToolkit.m is not used. SystemColors/LWCToolkit#loadNativeColors are for sure works on macOS it is responsible for the text selection color for example. > Even CsystemColors.m has all the color hardcoded > sColors[java_awt_SystemColor_ACTIVE_CAPTION_TEXT] = [NSColor blackColor]; All that hardcoded colors are bugs, but some of them use non-hardcoded values like: textColor/disabledControlTextColor/controlShadowColor/controlBackgroundColor/etc ------------- PR: https://git.openjdk.java.net/jdk/pull/1182