Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2019-11-22 10:16:56 +0000
committerLakshmi Shanmugam2019-11-25 10:11:22 +0000
commit1ece5e5955171db322072c4b9965874a589a8502 (patch)
tree878f009f920731c508e9064f621cac1d1080b3ea
parent34833556bd0c78880d1aa9d2db6f5af8e22c4455 (diff)
downloadeclipse.platform.ui-1ece5e5955171db322072c4b9965874a589a8502.tar.gz
eclipse.platform.ui-1ece5e5955171db322072c4b9965874a589a8502.tar.xz
eclipse.platform.ui-1ece5e5955171db322072c4b9965874a589a8502.zip
Bug 550967 - [10.15] Mac dark theme not listed in EclipseI20191125-1800I20191125-0600
Remove the os_version from one of the e4 dark theme declaration this will be used when no OS version is specified. Change-Id: I8e89705b9271a79cac8db43287b1f3444a6822de
-rw-r--r--bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java33
-rw-r--r--bundles/org.eclipse.ui.themes/plugin.xml3
2 files changed, 23 insertions, 13 deletions
diff --git a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
index b2be1cdd4d6..e815ac95b6d 100644
--- a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
+++ b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
@@ -113,6 +113,8 @@ public class ThemeEngine implements IThemeEngine {
File[] modifiedFiles = modDir.listFiles();
String currentOS = Platform.getOS();
String currentWS = Platform.getWS();
+ boolean e4_dark_mac_found = false;
+
for (IExtension e : extPoint.getExtensions()) {
for (IConfigurationElement ce : e.getConfigurationElements()) {
if (ce.getName().equals("theme")) {
@@ -121,20 +123,29 @@ public class ThemeEngine implements IThemeEngine {
String os = ce.getAttribute("os");
String version = ce.getAttribute("os_version");
- if (version == null) {
- version ="";
- } else {
- // For e4 dark theme on Mac, register the theme with matching OS version only
- if (E4_DARK_THEME_ID.equals(id) && Platform.OS_MACOSX.equals(currentOS) && os != null
- && os.equals(currentOS)) {
- if (!isOsVersionMatch(version)) {
- continue;
- } else {
- version = "";
- }
+ /*
+ * Code to support e4 dark theme on Mac 10.13 and older. For e4 dark theme on
+ * Mac, register the theme with matching OS version if specified.
+ */
+ if (E4_DARK_THEME_ID.equals(id) && Platform.OS_MACOSX.equals(currentOS) && os != null
+ && os.equals(currentOS)) {
+ // If e4 dark theme on Mac was already registered, don't try to match or
+ // register again.
+ if (e4_dark_mac_found) {
+ continue;
+ }
+ if (version != null && !isOsVersionMatch(version)) {
+ continue;
+ } else {
+ e4_dark_mac_found = true;
+ version = "";
}
}
+ if (version == null) {
+ version = "";
+ }
+
final String themeBaseId = id + version;
String themeId = themeBaseId;
String label = ce.getAttribute("label");
diff --git a/bundles/org.eclipse.ui.themes/plugin.xml b/bundles/org.eclipse.ui.themes/plugin.xml
index bd22670206c..f31076a2d0c 100644
--- a/bundles/org.eclipse.ui.themes/plugin.xml
+++ b/bundles/org.eclipse.ui.themes/plugin.xml
@@ -31,8 +31,7 @@
basestylesheeturi="css/e4-dark_mac.css"
id="org.eclipse.e4.ui.css.theme.e4_dark"
label="%theme.dark"
- os="macosx"
- os_version="10.14,10.15">
+ os="macosx">
</theme>
<theme
basestylesheeturi="css/e4_default_gtk.css"

Back to the top