Bug 569224 - [Big Sur] Different color for inactive selection background
in Eclipse dark theme
Reset alternateSelectedControlColor and secondarySelectedControlColor
when app appearance is changed using Display.setAppAppearance().
Change-Id: I2c61523da97d7e3db85b5eb0f53f75d1e75eafb0
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 89dc03f..bf3c004 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
@@ -4170,6 +4170,13 @@
}
}
+/**
+ * Resets the cached alternateSelectedControlColor and secondarySelectedControlColor.
+ */
+void resetSelectedControlColors() {
+ alternateSelectedControlColor = secondarySelectedControlColor = null;
+}
+
boolean runAsyncMessages (boolean all) {
return synchronizer.runAsyncMessages (all);
}
@@ -4349,6 +4356,7 @@
if (appearance != null && application != null) {
OS.objc_msgSend(application.id, OS.sel_setAppearance_, appearance.id);
appAppearance = newMode;
+ resetSelectedControlColors();
}
}