Skip to content

Commit

Permalink
[Themes] Use stylesheet extensions
Browse files Browse the repository at this point in the history
- Declare the additional stylesheets in the plugin.xml
- Then we don't have to add import statements in the original themes and stylesheets
- And fix a glitch on Mac in the "System" theme
  • Loading branch information
Phillipus committed Feb 18, 2024
1 parent 9fcc6bd commit e4a4e71
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 17 deletions.
57 changes: 48 additions & 9 deletions com.archimatetool.editor.themes/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<?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/basic/basic.css"
id="com.archimatetool.editor.theme.basic"
label="%theme.basic">
</theme>

</extension>

<extension
name="Themes"
point="org.eclipse.e4.ui.css.swt.theme">
<theme
basestylesheeturi="themes/archi/css/basic/basic.css"
id="com.archimatetool.editor.theme.basic"
label="%theme.basic">
</theme>
<theme
basestylesheeturi="themes/eclipse/css/e4_classic.css"
id="org.eclipse.e4.ui.css.theme.e4_classic"
Expand Down Expand Up @@ -67,6 +64,48 @@
label="%theme.system">
</theme>
</extension>
<extension
name="StyleSheets"
point="org.eclipse.e4.ui.css.swt.theme">
<stylesheet
uri="themes/eclipse/css/dark/e4-dark_preferencestyle.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_dark">
</themeid>
</stylesheet>
<stylesheet
uri="themes/archi/css/common/archi-globalstyle.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_classic">
</themeid>
</stylesheet>
<stylesheet
uri="themes/eclipse/css/dark/archi-dark-styling.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_dark">
</themeid>
</stylesheet>
<stylesheet
uri="themes/eclipse/css/light/archi-light-styling.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_default">
</themeid>
</stylesheet>
<stylesheet
uri="themes/eclipse/css/system/archi-light-styling.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_system">
</themeid>
</stylesheet>
<stylesheet
os="macosx"
uri="themes/eclipse/css/system/archi-system-mac.css">
<themeid
refid="org.eclipse.e4.ui.css.theme.e4_system">
</themeid>
</stylesheet>

</extension>
<extension
point="org.eclipse.ui.themes">
<themeElementCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/archi-dark-styling.css");

CTabFolder Canvas {
background-color: #2F2F2F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/archi-dark-styling.css");

.MPartStack.active CTabFolder Canvas {
background-color: #262626;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/archi-dark-styling.css");

CTabFolder Canvas {
background-color: #2F2F2F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/e4-dark-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/dark/archi-dark-styling.css");

CTabFolder Canvas {
background-color: #2F2F2F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/light/e4-light_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/light/e4-light_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/light/e4-light-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/light/archi-light-styling.css");
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* Lars Vogel <[email protected]> - Bug 420836
*******************************************************************************/

@import url("platform:/plugin/com.archimatetool.editor.themes/themes/archi/css/common/archi-globalstyle.css");

.MPart.busy {
font-style: italic;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/system/e4-light_partstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/system/e4-light_tabstyle.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/system/e4-light-drag-styling.css");
@import url("platform:/plugin/com.archimatetool.editor.themes/themes/eclipse/css/system/archi-light-styling.css");

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: '#COLOR-WIDGET-BACKGROUND';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*******************************************************************************
* Styling for Archi that over-rides some Eclipse stylings
*******************************************************************************/

/*
* On Mac there is white cheese in a Part's menu icon bar if the start and end colors are the same value
* So we set different start and end values.
*/

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: #F0F0F0;
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #F0F0F1;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
color: #E4E4E4;
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #E4E4E5;
}

0 comments on commit e4a4e71

Please sign in to comment.