diff options
| author | Lars Vogel | 2014-03-07 17:17:40 +0000 |
|---|---|---|
| committer | Lars Vogel | 2014-03-11 07:19:51 +0000 |
| commit | 15fc4ecbff38ec86eed5fce5fab9a0e83aee5bc1 (patch) | |
| tree | 7fed7431b2f8e2abe51788f759c7845d523263a5 | |
| parent | 14fb9fb831a20261cb9a2f241dd6093c4ed8b4e9 (diff) | |
| download | eclipse.platform.ui-15fc4ecbff38ec86eed5fce5fab9a0e83aee5bc1.tar.gz eclipse.platform.ui-15fc4ecbff38ec86eed5fce5fab9a0e83aee5bc1.tar.xz eclipse.platform.ui-15fc4ecbff38ec86eed5fce5fab9a0e83aee5bc1.zip | |
Bug 427896 - [Examples] Update Contacts demo for Luna
Includes the dark theme from the platform
Change-Id: I3a498b27c8f2b64d20ec1b1bf7cd45a46949ac1d
Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts.feature/feature.xml | 6 | ||||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/css/dark-gradient.css | 86 | ||||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/css/dark-include.css | 14 | ||||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/css/dark-include.png (renamed from examples/org.eclipse.e4.demo.contacts/css/dark-gradient.png) | bin | 477 -> 477 bytes | |||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/plugin.xml | 2 | ||||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/MenuThemeProcessor.java | 3 | ||||
| -rw-r--r-- | examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/ToolbarThemeProcessor.java | 4 |
7 files changed, 28 insertions, 87 deletions
diff --git a/examples/org.eclipse.e4.demo.contacts.feature/feature.xml b/examples/org.eclipse.e4.demo.contacts.feature/feature.xml index b18f36a1573..f5035795b32 100644 --- a/examples/org.eclipse.e4.demo.contacts.feature/feature.xml +++ b/examples/org.eclipse.e4.demo.contacts.feature/feature.xml @@ -23,4 +23,10 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.eclipse.ui.themes" + download-size="0" + install-size="0" + version="0.0.0"/> + </feature> diff --git a/examples/org.eclipse.e4.demo.contacts/css/dark-gradient.css b/examples/org.eclipse.e4.demo.contacts/css/dark-gradient.css deleted file mode 100644 index affbd39ddc2..00000000000 --- a/examples/org.eclipse.e4.demo.contacts/css/dark-gradient.css +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2010 Siemens AG and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Kai Tödter - initial implementation - ******************************************************************************/ - -Label, Button[style~='SWT.CHECK'] { - font: Verdana 8px; - color: rgb(240, 240, 240); -} - -Composite Label { - color: white; -} - -#SeparatorLabel { - color: #f08d00; -} - -Text { - font: Verdana 8px; -} - -Composite Text { - background-color: rgb(100, 100, 100); - color: white; -} - -SashForm { - background-color: rgb(48, 48, 48); -} - -#DetailsView { - background-color: gradient radial #575757 #101010 60%; -} - -Table { - background-color: gradient radial #575757 #101010 100%; - color: rgb(240, 240, 240); - font: Verdana 8px; -} - -.MTrimBar { - background-color: #777777 #373737 #202020 50% 50%; - color: rgb(150, 150, 150); - font: Verdana 8px; -} - -CTabFolder { - /* The tab rendering background for the min/max toolbar pulls - * background from the tabfolder's background (or it's parent?) - * and so the gradient doesn't come through. So just set the - * tabfolder's background to a color */ - /*background-color: #777777 #373737 #202020 50% 50%;*/ - background-color: #202020; - color: rgb(150, 150, 150); - swt-simple: true; -} - -CTabItem { - background-color: #4a4a4a #101010 60%; - color: rgb(240, 240, 240); - font: Verdana 8px; -} - -CTabItem:selected { - background-color: #4a4a4a #101010 60%; - color: rgb(240, 240, 240); - font: Verdana 8px; -} - -CTabItem.active:selected { - background-color: #777777 #373737 #101010 50% 50%; - color: #f08d00; -} - -Shell { - swt-background-mode: default; - background-color: gradient radial #575757 #101010 60%; -} diff --git a/examples/org.eclipse.e4.demo.contacts/css/dark-include.css b/examples/org.eclipse.e4.demo.contacts/css/dark-include.css new file mode 100644 index 00000000000..40881fedf41 --- /dev/null +++ b/examples/org.eclipse.e4.demo.contacts/css/dark-include.css @@ -0,0 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2014 vogella GmbH and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html. + * + * Contributors: + * Lars Vogel <Lars.Vogel@gmail.com> - initial implementation + ******************************************************************************/ + +@import url("platform:/plugin/org.eclipse.ui.themes/css/e4-dark.css"); + diff --git a/examples/org.eclipse.e4.demo.contacts/css/dark-gradient.png b/examples/org.eclipse.e4.demo.contacts/css/dark-include.png Binary files differindex cc5f8c08fbc..cc5f8c08fbc 100644 --- a/examples/org.eclipse.e4.demo.contacts/css/dark-gradient.png +++ b/examples/org.eclipse.e4.demo.contacts/css/dark-include.png diff --git a/examples/org.eclipse.e4.demo.contacts/plugin.xml b/examples/org.eclipse.e4.demo.contacts/plugin.xml index f307c9adcbc..d5142fd7108 100644 --- a/examples/org.eclipse.e4.demo.contacts/plugin.xml +++ b/examples/org.eclipse.e4.demo.contacts/plugin.xml @@ -40,7 +40,7 @@ <extension point="org.eclipse.e4.ui.css.swt.theme"> <theme - basestylesheeturi="css/dark-gradient.css" + basestylesheeturi="css/dark-include.css" id="org.eclipse.e4.demo.contacts.themes.darkgradient" label="Dark Gradient Theme"> </theme> diff --git a/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/MenuThemeProcessor.java b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/MenuThemeProcessor.java index 9391ba608b2..b956e2db103 100644 --- a/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/MenuThemeProcessor.java +++ b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/MenuThemeProcessor.java @@ -75,6 +75,9 @@ public class MenuThemeProcessor { themesMenu.setContributorURI(BUNDLE_ID); for (ITheme theme : themes) { + if (!theme.getId().startsWith("org.eclipse.e4.demo.contacts.")) { + return; + } MParameter parameter = service.createModelElement(MParameter.class); parameter.setName("contacts.commands.switchtheme.themeid"); //$NON-NLS-1$ parameter.setValue(theme.getId()); diff --git a/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/ToolbarThemeProcessor.java b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/ToolbarThemeProcessor.java index 1c0dbd8e5a7..b1a974d7c52 100644 --- a/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/ToolbarThemeProcessor.java +++ b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/processors/ToolbarThemeProcessor.java @@ -71,6 +71,10 @@ public class ToolbarThemeProcessor { service.createModelElement(MToolBarSeparator.class)); for (ITheme theme : themes) { + // only include themes from org.eclipse.e4.demo.contacts.* + if (!theme.getId().startsWith("org.eclipse.e4.demo.contacts.")) { + return; + } MParameter parameter = service .createModelElement(MParameter.class); parameter.setName("contacts.commands.switchtheme.themeid"); //$NON-NLS-1$ |
