Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ protected void applyCSSProperty(Control control, String property,
if (value instanceof CssPrimitive) {
Color color = (Color) engine.convert(value, Color.class,
control.getDisplay());
((ICTabRendering) renderer).setUnselectedTabsColor(color);
folder.setBackground(color);
removeResizeEventListener(folder);
applySolidColor(folder, (ICTabRendering) renderer, color);
return;
}
if (value instanceof CssList) {
Expand All @@ -65,6 +63,12 @@ protected void applyCSSProperty(Control control, String property,
control.getDisplay(), engine);
percents = CSSSWTColorHelper.getPercents(grad);
}
if (isFlat(colors)) {
// A flat gradient still leaves CTabFolder.gradientColors set, which makes the
// folder paint the controls in its tab row with a background image
applySolidColor(folder, (ICTabRendering) renderer, colors[0]);
return;
}
((ICTabRendering) renderer)
.setUnselectedTabsColor(colors, percents);
folder.setBackground(colors, percents, true);
Expand All @@ -84,6 +88,24 @@ private boolean isUnselectedTabsColorProp(String property) {
return UNSELECTED_TABS_COLOR_PROP.equals(property);
}

private void applySolidColor(CTabFolder folder, ICTabRendering renderer, Color color) {
renderer.setUnselectedTabsColor(color);
folder.setBackground(color);
removeResizeEventListener(folder);
}

private static boolean isFlat(Color[] colors) {
if (colors == null || colors.length == 0 || colors[0] == null) {
return false;
}
for (Color color : colors) {
if (!colors[0].equals(color)) {
return false;
}
}
return true;
}

// TODO: It needs to be refactored when the Bug 33276 gets fixed
private void appendResizeEventListener(CTabFolder folder) {
if (hasResizeEventListener(folder)) {
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.themes;singleton:=true
Bundle-Version: 1.3.0.qualifier
Bundle-Version: 1.3.100.qualifier
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.e4.ui.css.swt.theme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ThemesExtension { color-definition:
'#org-eclipse-ui-workbench-DARK_BACKGROUND',
'#org-eclipse-ui-workbench-DARK_FOREGROUND',
'#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START',
'#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END',
Comment thread
vogella marked this conversation as resolved.
'#org-eclipse-ui-workbench-INACTIVE_TAB_BG_START',
'#org-eclipse-ui-workbench-INACTIVE_TAB_BG_END',
'#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR',
Expand All @@ -33,7 +32,6 @@ ThemesExtension { color-definition:
'#org-eclipse-ui-workbench-INACTIVE_TAB_UNSELECTED_TEXT_COLOR',
'#org-eclipse-ui-workbench-INACTIVE_TAB_SELECTED_TEXT_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_BG_START',
'#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END',
'#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR',
Expand Down Expand Up @@ -68,12 +66,6 @@ ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
label: url('platform:/plugin/org.eclipse.ui.themes?message=INACTIVE_UNSELECTED_TABS_COLOR_START');
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #464649;
Comment thread
vogella marked this conversation as resolved.
category: '#org-eclipse-ui-presentation-default';
label: url('platform:/plugin/org.eclipse.ui.themes?message=INACTIVE_UNSELECTED_TABS_COLOR_END');
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_BG_START {
color: #3B4042;
category: '#org-eclipse-ui-presentation-default';
Expand Down Expand Up @@ -128,12 +120,6 @@ ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
label: url('platform:/plugin/org.eclipse.ui.themes?message=ACTIVE_UNSELECTED_TABS_COLOR_START');
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #48484C;
Comment thread
vogella marked this conversation as resolved.
category: '#org-eclipse-ui-presentation-default';
label: url('platform:/plugin/org.eclipse.ui.themes?message=ACTIVE_UNSELECTED_TABS_COLOR_END');
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_BG_START {
color: #48484C;
category: '#org-eclipse-ui-presentation-default';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CTabFolder {
swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
swt-tab-outline: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTLINE_COLOR'; /* border color for selected tab */
swt-outer-keyline-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR'; /* border color for whole tabs container */
swt-unselected-tabs-color: '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START' '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END' 100% 100%; /* title background for unselected tab */
swt-unselected-tabs-color: '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START'; /* title background for unselected tab */
swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END'; /* title background for selected tab */
swt-unselected-hot-tab-color-background: #161616; /* Bug 465711 */
swt-selected-tab-highlight: none;
Expand Down
8 changes: 0 additions & 8 deletions bundles/org.eclipse.ui.themes/css/e4_default_gtk.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #F8F8F8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #e5e5e5;
}
Expand All @@ -40,10 +36,6 @@ ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #e5e5e5;
}
Expand Down
8 changes: 0 additions & 8 deletions bundles/org.eclipse.ui.themes/css/e4_default_mac.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #eaeaea;
}
Expand Down
8 changes: 0 additions & 8 deletions bundles/org.eclipse.ui.themes/css/e4_default_win.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #e5e5e5;
}
Expand All @@ -39,10 +35,6 @@ ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #f8f8f8; /* same as '#org-eclipse-ui-workbench-SECONDARY_BACKGROUND' cannot use it directly*/
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #e5e5e5;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@
/* 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',
Expand All @@ -42,12 +40,6 @@ ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START {
label: url('platform:/plugin/org.eclipse.ui.themes?message=INACTIVE_UNSELECTED_TABS_COLOR_START')
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_END {
color: #ffffff;
category: '#org-eclipse-ui-presentation-default';
label: url('platform:/plugin/org.eclipse.ui.themes?message=INACTIVE_UNSELECTED_TABS_COLOR_END');
}

ColorDefinition#org-eclipse-ui-workbench-INACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #ffffff;
category: '#org-eclipse-ui-presentation-default';
Expand All @@ -72,12 +64,6 @@ ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START {
label: url('platform:/plugin/org.eclipse.ui.themes?message=ACTIVE_UNSELECTED_TABS_COLOR_START');
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END {
color: #ffffff;
category: '#org-eclipse-ui-presentation-default';
label: url('platform:/plugin/org.eclipse.ui.themes?message=ACTIVE_UNSELECTED_TABS_COLOR_END');
}

ColorDefinition#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR {
color: #cccccc;
category: '#org-eclipse-ui-presentation-default';
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.eclipse.ui.themes/css/light/e4-light_tabstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.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-unselected-tabs-color: '#org-eclipse-ui-workbench-INACTIVE_UNSELECTED_TABS_COLOR_START';
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';
Expand All @@ -36,7 +36,7 @@

.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-unselected-tabs-color: '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START';
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';
Expand Down
3 changes: 0 additions & 3 deletions bundles/org.eclipse.ui.themes/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ DARK_BACKGROUND=Dark Background Color
DARK_FOREGROUND=Dark Foreground Color
SECONDARY_BACKGROUND=Background color of secondary part
INACTIVE_UNSELECTED_TABS_COLOR_START=Inactive, unselected part color begin
INACTIVE_UNSELECTED_TABS_COLOR_START=Inactive, unselected part color begin
INACTIVE_UNSELECTED_TABS_COLOR_END=Inactive, unselected part color end
INACTIVE_TAB_TEXT_COLOR=Inactive part text color
INACTIVE_TAB_OUTER_KEYLINE_COLOR=Inactive part outer keyline color
INACTIVE_TAB_INNER_KEYLINE_COLOR=Inactive part inner keyline color
INACTIVE_TAB_OUTLINE_COLOR=Inactive part outline color
ACTIVE_UNSELECTED_TABS_COLOR_START=Active, unselected part color begin
ACTIVE_UNSELECTED_TABS_COLOR_END=Active, unselected part color end
ACTIVE_TAB_TEXT_COLOR=Active part text color
ACTIVE_TAB_OUTER_KEYLINE_COLOR=Active part outer keyline color
ACTIVE_TAB_INNER_KEYLINE_COLOR=Active part inner keyline color
Expand Down
Loading