8251377: [macos11] JTabbedPane selected tab text is barely legible #65
Conversation
|
Webrevs
|
/label remove 2d |
/label remove awt |
@prsadhuk |
@prsadhuk |
@@ -869,7 +870,7 @@ public Object createValue(UIDefaults defaultsTable) { | |||
"TabbedPane.tabsOverlapBorder", Boolean.TRUE, | |||
"TabbedPane.selectedTabTitlePressedColor", selectedTabTitlePressedColor, | |||
"TabbedPane.selectedTabTitleDisabledColor", selectedTabTitleDisabledColor, | |||
"TabbedPane.selectedTabTitleNormalColor", selectedTabTitleNormalColor, | |||
"TabbedPane.selectedTabTitleNormalColor", System.getProperty("os.version").contains("10.16") ? selectedControlTextColor : selectedTabTitleNormalColor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't look very robust. What will happen on the next version of macOS ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for BigSur and above is added
Mailing list message from Alan Snyder on swing-dev: What alternative are you proposing? I don?t believe there is any option that is guaranteed not to require changing |
Alan, |
Headful jtreg and jck tests have passed. |
@prsadhuk This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 12 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
@prsadhuk Since your change was applied there have been 12 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 3f67afd. |
@@ -870,7 +870,7 @@ public Object createValue(UIDefaults defaultsTable) { | |||
"TabbedPane.tabsOverlapBorder", Boolean.TRUE, | |||
"TabbedPane.selectedTabTitlePressedColor", selectedTabTitlePressedColor, | |||
"TabbedPane.selectedTabTitleDisabledColor", selectedTabTitleDisabledColor, | |||
"TabbedPane.selectedTabTitleNormalColor", System.getProperty("os.version").contains("10.16") ? selectedControlTextColor : selectedTabTitleNormalColor, | |||
"TabbedPane.selectedTabTitleNormalColor", JRSUIUtils.isMacOSXBigSurOrAbove() ? selectedControlTextColor : selectedTabTitleNormalColor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess an intention was to use the JRSUIUtils.isBigSurOrAbove field not the JRSUIUtils.isMacOSXBigSurOrAbove() method, otherwise, why did you add it.
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.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk16 pull/65/head:pull/65
$ git checkout pull/65