diff options
| author | Stefan Winkler | 2014-04-02 09:39:59 +0000 |
|---|---|---|
| committer | Stefan Winkler | 2014-04-02 22:12:51 +0000 |
| commit | 29bb58b693e30bc43d9847eb42a2a82182d34ba1 (patch) | |
| tree | ad34c12a1c4700f1f4959a3f069543fbd943bef9 | |
| parent | 128aaa68becbbfa7dd63da190eb9dc83a6267a97 (diff) | |
| download | eclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.tar.gz eclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.tar.xz eclipse.platform.ui-29bb58b693e30bc43d9847eb42a2a82182d34ba1.zip | |
Bug 430848 - [Themes] Progress Label background changes to dark during
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.css | 13 | ||||
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/BasicSplashHandler.java | 13 |
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 0b8db0ac14f..130b58e89de 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 2ba1da36fdf..551dd6e1a90 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() { |
