Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-02-15 18:10:29 +0000
committerLakshmi P Shanmugam2021-05-31 12:10:14 +0000
commit050e9b8af99bd79406c700e79b94c40a3d13f584 (patch)
tree4b3242ac18ff38da40470025e353a0bef3b1c319
parent109f40c0ff2774891afae9c36632a176e1c7d049 (diff)
downloadeclipse.platform.swt-050e9b8af99bd79406c700e79b94c40a3d13f584.tar.gz
eclipse.platform.swt-050e9b8af99bd79406c700e79b94c40a3d13f584.tar.xz
eclipse.platform.swt-050e9b8af99bd79406c700e79b94c40a3d13f584.zip
Bug 567389 - [Big Sur] Selected TabFolder's text is invisible on macOS11
Added method OS.isBigSurOrLater to detect BigSur OS. Change-Id: Iddebc964426aada862934c7d60481678ed2a89f3 (cherry picked from commit 89d8e7fd0e08d2f11a847bfec16093cbf49abf7e) Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180984 Tested-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com> Reviewed-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index d2cc4720df..93b790cdf7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -221,6 +221,17 @@ public class OS extends C {
OS.objc_msgSend(NSApplication.sharedApplication().id, sel_appAppearanceChanged, isDarkTheme ? 1 : 0);
}
+ /**
+ * @return true for macOS BigSur or later, returns false for macOS 10.15 and older
+ */
+ public static boolean isBigSurOrLater () {
+ /*
+ * Currently Big Sur OS version matches with 10.16 and not 11.0. This may be temporary.
+ * Creating a method, so that it can be fixed in one place if/when this changes.
+ */
+ return OS.VERSION >= OS.VERSION_MMB(10, 16, 0);
+ }
+
/** JNI natives */
/** @method flags=jni */

Back to the top