Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk16 Public archive

Commit

Permalink
Check for BigSur and above
Browse files Browse the repository at this point in the history
  • Loading branch information
prsadhuk committed Dec 24, 2020
1 parent 504f1bd commit ad3c52b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/java.desktop/macosx/classes/apple/laf/JRSUIUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public final class JRSUIUtils {
static boolean isLeopard = isMacOSXLeopard();
static boolean isSnowLeopardOrBelow = isMacOSXSnowLeopardOrBelow();
static boolean isCatalinaOrAbove = isMacOSXCatalinaOrAbove();
static boolean isBigSurOrAbove = isMacOSXBigSurOrAbove();

public static boolean isMacOSXBigSurOrAbove() {
return currentMacOSXVersionMatchesGivenVersionRange(16, true, false, true);
}

static boolean isMacOSXCatalinaOrAbove() {
return currentMacOSXVersionMatchesGivenVersionRange(15, true, false, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
"TabbedPane.selectedTabTitleShadowDisabledColor", selectedTabTitleShadowDisabledColor,
"TabbedPane.selectedTabTitleShadowNormalColor", selectedTabTitleShadowNormalColor,
"TabbedPane.nonSelectedTabTitleNormalColor", nonSelectedTabTitleNormalColor,
Expand Down

0 comments on commit ad3c52b

Please sign in to comment.