diff options
| author | Lakshmi Shanmugam | 2019-07-30 08:57:31 +0000 |
|---|---|---|
| committer | Lakshmi Shanmugam | 2019-07-30 08:57:31 +0000 |
| commit | 6f954e2f4e2cddd8d6c14afde51b27c86b9d8266 (patch) | |
| tree | 234262df94603889f5094aac8d03acef2fc02b2f | |
| parent | 6c8c409014a93a29749cf1be53146fddfda8a71c (diff) | |
| download | eclipse.platform.swt-6f954e2f4e2cddd8d6c14afde51b27c86b9d8266.tar.gz eclipse.platform.swt-6f954e2f4e2cddd8d6c14afde51b27c86b9d8266.tar.xz eclipse.platform.swt-6f954e2f4e2cddd8d6c14afde51b27c86b9d8266.zip | |
Bug 549588 - COLOR_WIDGET_DISABLED_FOREGROUND doesn't work correctly on
10.14
On 10.14, NSColor.disabledControlTextColor() returns black color with
alpha instead of gray. This color doesn't work as expected when set on
StyledText. For now, use NSColor.secondarySelectedControlColor() to give
a gray color that looks fine in both light and dark theme.
Change-Id: I8eb55cd4c368f5fe45955f8eda08dc7c6dda6196
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index b0f8e573af..a9f216f109 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -1912,7 +1912,13 @@ double [] getWidgetColorRGB (int id) { color = new NSColor(dict.valueForKey(OS.NSForegroundColorAttributeName)); textView.release (); break; - case SWT.COLOR_WIDGET_DISABLED_FOREGROUND: color = NSColor.disabledControlTextColor(); break; + case SWT.COLOR_WIDGET_DISABLED_FOREGROUND: + if (OS.VERSION >= OS.VERSION (10, 14, 0)) { + color = NSColor.secondarySelectedControlColor(); + } else { + color = NSColor.disabledControlTextColor(); + } + break; } return getNSColorRGB (color); } |
