Skip to content

Commit

Permalink
[e4] Support for Themes
Browse files Browse the repository at this point in the history
* Add Preference to change UI theme
* Add themes plugin
* Add test Archi CSS Theme (either remove this or get it working!)
* Use theme css styles copied from Eclipse 4.4 RC2 build
  • Loading branch information
Phillipus committed Jul 4, 2014
1 parent f0cfb4f commit 6ba7c44
Show file tree
Hide file tree
Showing 38 changed files with 1,072 additions and 16 deletions.
5 changes: 5 additions & 0 deletions com.archimatetool.editor.themes/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
</classpath>
28 changes: 28 additions & 0 deletions com.archimatetool.editor.themes/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.archimatetool.editor.themes</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
7 changes: 7 additions & 0 deletions com.archimatetool.editor.themes/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.archimatetool.editor.themes
Bundle-SymbolicName: com.archimatetool.editor.themes;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: Phillip Beauvoir
4 changes: 4 additions & 0 deletions com.archimatetool.editor.themes/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
themes/
83 changes: 83 additions & 0 deletions com.archimatetool.editor.themes/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.e4.ui.css.swt.theme">
<theme
basestylesheeturi="themes/archi/css/archi.css"
id="com.archimatetool.editor.theme"
label="Archi">
</theme>

<stylesheet
uri="themes/archi/css/archi.css">
<osgiresourcelocator
uri="platform:/plugin/com.archimatetool.editor.themes/themes/archi/images/">
</osgiresourcelocator>
<themeid
refid="com.archimatetool.editor.theme">
</themeid>
</stylesheet>
</extension>

<extension
id="org.eclipse.e4.Themes"
point="org.eclipse.e4.ui.css.swt.theme">
<theme
basestylesheeturi="themes/eclipse/css/e4_classic_winxp.css"
id="org.eclipse.e4.ui.css.theme.e4_classic"
label="Classic">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_gtk.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="GTK"
os="linux">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_mac.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="Mac"
os="macosx">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_win7.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="Windows 7"
os="win32"
os_version="6.1">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_winxp_blu.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="Windows XP Blue"
os="win32">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_classic_win7.css"
id="org.eclipse.e4.ui.css.theme.e4_classic"
label="Windows 7 Classic"
os="win32"
os_version="6.1">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_gtk.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="Solaris"
os="solaris">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_default_gtk.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="AIX"
os="aix">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_classic_winxp.css"
id="org.eclipse.e4.ui.css.theme.e4_default"
label="HPUX"
os="hpux">
</theme>
</extension>

</plugin>
23 changes: 23 additions & 0 deletions com.archimatetool.editor.themes/themes/archi/css/archi.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/e4_basestyle.css");

.MTrimmedWindow {
background-color: #eeeeee;
}

.MPartStack.active {
swt-unselected-tabs-color: #F3F9FF #D0DFEE #CEDDED #CEDDED #D2E1F0 #D2E1F0 #FFFFFF 20% 45% 60% 70% 100% 100%;
swt-outer-keyline-color: #dddddd;
}


.MToolBar.Draggable {
handle-image: url(./archiHandle.png);
}

.MToolControl.Draggable {
handle-image: url(./archiHandle.png);
}

.MToolControl.TrimStack {
handle-image: url(./archiHandle.png);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
205 changes: 205 additions & 0 deletions com.archimatetool.editor.themes/themes/eclipse/css/e4_basestyle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
/*******************************************************************************
* Copyright (c) 2010, 2014 IBM Corporation 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:
* IBM Corporation - initial API and implementation
* Lars Vogel <[email protected]> - Bug 420836
*******************************************************************************/

/* New ColorDefinitions for the E4 default theme */
ThemesExtension { color-definition:
'#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START',
'#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END',
'#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR',
'#org-eclipse-ui-workbench-INACTIVE_TAB_INNER_KEYLINE_COLOR',
'#org-eclipse-ui-workbench-INACTIVE_TAB_OUTLINE_COLOR',
'#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START',
'#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END',
'#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR',
'#org-eclipse-ui-workbench-ACTIVE_TAB_INNER_KEYLINE_COLOR',
'#org-eclipse-ui-workbench-ACTIVE_TAB_OUTLINE_COLOR';
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Inactive, unselected part color start';
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Inactive, unselected part color end';
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Inactive part outer keyline color';
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_INNER_KEYLINE_COLOR {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Inactive part inner keyline color';
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTLINE_COLOR {
color: #B6BCCC;
category: '#org-eclipse-ui-presentation-default';
label: 'Inactive part outline color';
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Active, unselected part color begin';
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Active, unselected part color end';
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Active part outer keyline color';
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_INNER_KEYLINE_COLOR {
color: #FFFFFF;
category: '#org-eclipse-ui-presentation-default';
label: 'Active part inner keyline color';
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTLINE_COLOR {
color: #B6BCCC;
category: '#org-eclipse-ui-presentation-default';
label: 'Active part outline color';
}

/* Already existing ColorDefinitions overridden for the E4 default theme */
ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_BG_START {
color: #dddfe5;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_BG_END {
color: #FFFFFF;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_BG_START{
color: #FFFFFF;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END {
color: #FFFFFF;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_START {
color: #FFFFFF;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_END {
color: #FFFFFF;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_TEXT_COLOR {
color: #000000;
}

.MTrimmedWindow.topLevel {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 3px;
margin-right: 3px;
}

.MPart.busy {
font-style: italic;
}

.MPart.highlighted {
font-weight: bold;
}

.MPartStack, .MPart {
font-family: '#org-eclipse-ui-workbench-TAB_TEXT_FONT';
}

CTabItem:selected {
color: '#org-eclipse-ui-workbench-ACTIVE_TAB_TEXT_COLOR';
}

.MPartStack {
swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
swt-selected-tab-fill: '#org-eclipse-ui-workbench-INACTIVE_TAB_BG_START' '#org-eclipse-ui-workbench-INACTIVE_TAB_BG_END' 100% 100%;
swt-unselected-tabs-color: '#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START' '#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END' 100% 100%;
swt-outer-keyline-color: '#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR';
swt-inner-keyline-color: '#org-eclipse-ui-workbench-INACTIVE_TAB_INNER_KEYLINE_COLOR';
swt-tab-outline: '#org-eclipse-ui-workbench-INACTIVE_TAB_OUTLINE_COLOR';
padding: 0px 2px 2px;
swt-shadow-visible: false;
swt-mru-visible: false;
color: '#org-eclipse-ui-workbench-INACTIVE_TAB_TEXT_COLOR';
}

.MPartStack.active {
swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_START' '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END' 100% 100%;
swt-unselected-tabs-color: '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START' '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END' 100% 100%;
swt-outer-keyline-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR';
swt-inner-keyline-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_INNER_KEYLINE_COLOR';
swt-tab-outline: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTLINE_COLOR';
swt-shadow-visible: false;
}

.MPartStack.active.noFocus {
swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_START' '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_END' 100% 100%;
}

.MPartStack.active.noFocus > CTabItem:selected {
color: '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_TEXT_COLOR';
}

#PerspectiveSwitcher {
eclipse-perspective-keyline-color: #AAB0BF #AAB0BF;
}

.MToolControl.TrimStack {
frame-image: url(./winXPTSFrame.png);
handle-image: url(./winXPHandle.png);
frame-cuts: 5px 1px 5px 16px;
}

.MToolBar.Draggable {
handle-image: url(./dragHandle.png);
}

.MToolControl.Draggable {
handle-image: url(./dragHandle.png);
}

.DragFeedback {
background-color: COLOR-WIDGET-NORMAL-SHADOW;
}

.ModifiedDragFeedback {
background-color: #A0A000;
}

.MPartStack#left Composite, .MPartStack#right Composite, .MPartStack#bottom Composite {
background-color: '#org-eclipse-ui-workbench-INACTIVE_TAB_BG_END';
}

.MPartStack#left.active Composite, .MPartStack#right.active Composite, .MPartStack#bottom.active Composite {
background-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END';
}

.MPartStack#left.active.noFocus Composite, .MPartStack#right.active.noFocus Composite, .MPartStack#bottom.active.noFocus Composite {
background-color: '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_END';
}
Loading

0 comments on commit 6ba7c44

Please sign in to comment.