diff options
| author | Lakshmi Priya Shanmugam | 2019-01-31 10:45:54 +0000 |
|---|---|---|
| committer | Lakshmi Priya Shanmugam | 2019-01-31 10:50:40 +0000 |
| commit | 6c97ab637f4d1fc5a5d255581eb6be2b5eaa2a45 (patch) | |
| tree | 43e63500eee2b25bca0142c883d31e27acb25ee6 | |
| parent | 825ee1cd13332e36c342d96a65f9fe00662f23eb (diff) | |
| download | eclipse.platform.swt-6c97ab637f4d1fc5a5d255581eb6be2b5eaa2a45.tar.gz eclipse.platform.swt-6c97ab637f4d1fc5a5d255581eb6be2b5eaa2a45.tar.xz eclipse.platform.swt-6c97ab637f4d1fc5a5d255581eb6be2b5eaa2a45.zip | |
Bug 543932 - Tree/Table should use correct colors in Eclipse Dark Theme
on Mac
Fix tree and table foreground for Eclipse dark theme.
Change-Id: I60e8f829a73585f96420f3df4b1c478f6c2b0307
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java | 4 | ||||
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index 02e5f1ac85..8270f29bf7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -968,7 +968,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec Color selectionBackground = null, selectionForeground = null; if (isSelected && (hooksErase || hooksPaint)) { - selectionForeground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlTextColor : display.selectedControlTextColor); + selectionForeground = Color.cocoa_new(display, (hasFocus || Display.APPEARANCE.Dark == display.appAppearance) ? display.alternateSelectedControlTextColor : display.selectedControlTextColor); selectionBackground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlColor : display.secondarySelectedControlColor); } @@ -1500,7 +1500,7 @@ public Color getHeaderForeground () { return getHeaderForegroundColor (); } -private Color getHeaderForegroundColor () { +Color getHeaderForegroundColor () { return headerForeground != null ? Color.cocoa_new (display, headerForeground) : getForegroundColor (); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index c60ed44f1a..1a3989ae1d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -1032,7 +1032,7 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec Color selectionBackground = null, selectionForeground = null; if (isSelected && (hooksErase || hooksPaint)) { - selectionForeground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlTextColor : display.selectedControlTextColor); + selectionForeground = Color.cocoa_new(display, (hasFocus || Display.APPEARANCE.Dark == display.appAppearance) ? display.alternateSelectedControlTextColor : display.selectedControlTextColor); selectionBackground = Color.cocoa_new(display, hasFocus ? display.alternateSelectedControlColor : display.secondarySelectedControlColor); } @@ -1582,7 +1582,7 @@ public Color getHeaderForeground () { return getHeaderForegroundColor (); } -private Color getHeaderForegroundColor () { +Color getHeaderForegroundColor () { return headerForeground != null ? Color.cocoa_new (display, headerForeground) : defaultForeground (); } |
