diff options
| author | Lakshmi Shanmugam | 2021-05-25 14:17:49 +0000 |
|---|---|---|
| committer | Lakshmi P Shanmugam | 2021-05-25 14:43:17 +0000 |
| commit | 46cd2e6659ad5ebae04a6478d6a8ed30c564deea (patch) | |
| tree | 0b45961575c27d9396f42c9a67ac06e26d07a6a2 | |
| parent | 3f5c263b726f16e75e2e662daa9bae1e63fa64ce (diff) | |
| download | eclipse.platform.swt-46cd2e6659ad5ebae04a6478d6a8ed30c564deea.tar.gz eclipse.platform.swt-46cd2e6659ad5ebae04a6478d6a8ed30c564deea.tar.xz eclipse.platform.swt-46cd2e6659ad5ebae04a6478d6a8ed30c564deea.zip | |
Bug 567389 - [Big Sur] Selected TabFolder's text is invisible on macOS11
Added method OS.isBigSurOrLater to detect BigSur OS.
Change-Id: I586fa6af9eed6a39fe6796b99af86d8fba4c3a67
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180999
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.java | 11 |
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 d322f62ec5..2f534a23eb 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 @@ -181,6 +181,17 @@ public class OS extends C { public static final long /*int*/ class_NSToolbarView = objc_getClass("NSToolbarView"); + /** + * @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_MMB >= OS.VERSION_MMB(10, 16, 0); + } + /** JNI natives */ /** @method flags=jni */ |
