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

Sergey Bylokhov serb at openjdk.java.net
Tue Nov 24 21:26:03 UTC 2020


On Tue, 24 Nov 2020 08:48:36 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Then try to dig into it a little bit, probably a good reason to ask about the current font color in the tab at the Apple forum.
>
> Tried to find and change tabpane background color for "selected" tab but unable to do so. 
> Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background color to no avail. Tried to set background by calling tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets background for non-selected tab (keeping black background for selected tab in mohave unchanged). I see it's been like that at least from jdk8GA.
> Post to apple forum is unanswered.

> When inactive, I use 0 0 0 192. As far as I can tell, this does not correspond to a named color.
> It would be wrong to assume that Apple only uses named colors in their UIs.
> The named colors are for application developers, not for Apple itself.

The problem here is that we do not control the color of the tab pane, it is controlled by Apple, and if we hardcore some color on our side we will get the same bugs again and again. I am sure that a similar bug will come in the dark mode if we will enable it.

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

PR: https://git.openjdk.java.net/jdk/pull/1182


More information about the swing-dev mailing list