<Swing Dev> [jdk16] RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Thu Dec 24 18:36:13 UTC 2020


On Thu, 24 Dec 2020 18:08:57 GMT, Phil Race <prr at openjdk.org> wrote:

>> Please review a fix for jdk16.
>> On macOS 11 (bigsur), using the Swing Aqua Look and Feel, the text of the selected JTabbedPane tab title text is just a light gray outline of white text on a white background. The macOS 11 design inverted from dark background / light text to light background / dark text, so white text on white background is not legible.
>> Correct system color to use for this scenario, as per Apple, is [NSColor controlTextColor]
>> so the proposed fix is to use this system color for BigSur. 
>> For preBigSur releases, "white" is still used as the above color is for text color but the tabPane background color is still not readable through any Apple API, so [NSColor controlTextColor] which returns black will not be legible on preBigSur releases which has black background.
>
>> _Mailing list message from [Alan Snyder](mailto:javalists at cbfiddle.com) on [swing-dev](mailto:swing-dev at openjdk.java.net):_
>> 
>> What alternative are you proposing? I don?t believe there is any option that is guaranteed not to require changing
>> for some future release of macOS without some new API from Apple, e.g. ?selectedTabTextColor?.
> 
> Alan,
> We contacted Apple and this is their recommendation since there is no way to future-proof it.

Headful jtreg and jck tests have passed.

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

PR: https://git.openjdk.java.net/jdk16/pull/65


More information about the swing-dev mailing list