Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Priya Shanmugam2019-01-31 05:45:54 -0500
committerLakshmi Priya Shanmugam2019-01-31 05:50:40 -0500
commit6c97ab637f4d1fc5a5d255581eb6be2b5eaa2a45 (patch)
tree43e63500eee2b25bca0142c883d31e27acb25ee6
parent825ee1cd13332e36c342d96a65f9fe00662f23eb (diff)
downloadeclipse.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.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java4
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 ();
}

Back to the top