aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Winkler2014-04-02 05:39:59 (EDT)
committerStefan Winkler2014-04-02 18:12:51 (EDT)
commit29bb58b693e30bc43d9847eb42a2a82182d34ba1 (patch)
treead34c12a1c4700f1f4959a3f069543fbd943bef9
parent128aaa68becbbfa7dd63da190eb9dc83a6267a97 (diff)
downloadeclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.zip
eclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.tar.gz
eclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.tar.bz2
Bug 430848 - [Themes] Progress Label background changes to dark duringrefs/changes/09/24309/4
the startup splash screen - added IDs to splash screen widgets - added CSS rules to style them individually Change-Id: Ica737bcef4bbed27214fbe6485411762079e327a Signed-off-by: Stefan Winkler <stefan@winklerweb.net>
-rw-r--r--bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css13
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java13
2 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css
index 0b8db0a..130b58e 100644
--- a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css
+++ b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_globalstyle.css
@@ -414,3 +414,16 @@ FlyoutControlComposite, FlyoutControlComposite ToolBar, FlyoutControlComposite C
background-color: #3f4447;
color: #EEEEEE;
}
+
+/* See Bug 430848: We need to override the theme of the Eclipse splash screen, because
+ * otherwise the splash screen would be partly switched to the dark theme during startup,
+ * which does not look very nice.
+ */
+Label#org-eclipse-ui-splash-progressText {
+ background-color: #f7f7f7;
+ color: #9c9696; /* see property startupForegroundColor in the product */
+}
+
+ProgressIndicator#org-eclipse-ui-splash-progressIndicator {
+ background-color: #e1e1e1;
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java
index 2ba1da3..551dd6e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Stefan Winkler <stefan@winklerweb.net> - Bug 430848
*******************************************************************************/
package org.eclipse.ui.splash;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.e4.ui.css.swt.CSSSWTConstants;
import org.eclipse.jface.dialogs.ProgressIndicator;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.ProgressMonitorPart;
@@ -34,6 +36,10 @@ import org.eclipse.ui.internal.StartupThreading.StartupRunnable;
*/
public abstract class BasicSplashHandler extends AbstractSplashHandler {
+ private static final String SPLASH_PROGRESS_PART_ID = "org-eclipse-ui-splash-progressPart"; //$NON-NLS-1$
+ private static final String SPLASH_PROGRESS_INDICATOR_ID = "org-eclipse-ui-splash-progressIndicator"; //$NON-NLS-1$
+ private static final String SPLASH_PROGRESS_TEXT_ID = "org-eclipse-ui-splash-progressText"; //$NON-NLS-1$
+
/**
* Hacks the progress monitor to have absolute positioning for its controls.
* In addition, all methods that access the controls will be wrapped in an
@@ -43,6 +49,13 @@ public abstract class BasicSplashHandler extends AbstractSplashHandler {
public AbsolutePositionProgressMonitorPart(Composite parent) {
super(parent, null);
setLayout(null);
+ setCSSData();
+ }
+
+ private void setCSSData() {
+ this.setData(CSSSWTConstants.CSS_ID_KEY, SPLASH_PROGRESS_PART_ID);
+ fProgressIndicator.setData(CSSSWTConstants.CSS_ID_KEY, SPLASH_PROGRESS_INDICATOR_ID);
+ fLabel.setData(CSSSWTConstants.CSS_ID_KEY, SPLASH_PROGRESS_TEXT_ID);
}
public ProgressIndicator getProgressIndicator() {