From 28cde07881fa83665931c8689ef51ac384f155a9 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 24 Aug 2026 14:00:45 +0200 Subject: [PATCH 1/2] Use a solid color for unselected tabs The themes declared two identical gradient stops, which left CTabFolder.gradientColors set and made the folder paint the controls in its tab row with a rendered background image instead of a plain color. The themes now use a single color, the CSS handler collapses a flat gradient to the solid path, and the unused *_UNSELECTED_TABS_COLOR_END definitions are removed. Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/4274 --- .../CSSPropertyUnselectedTabsSWTHandler.java | 28 +++++++++++++++++-- .../css/dark/e4-dark_ide_colorextensions.css | 14 ---------- .../css/dark/e4-dark_tabstyle.css | 2 +- .../css/e4_default_gtk.css | 8 ------ .../css/e4_default_mac.css | 8 ------ .../css/e4_default_win.css | 8 ------ .../light/e4-light_ide_colorextensions.css | 14 ---------- .../css/light/e4-light_tabstyle.css | 4 +-- .../org.eclipse.ui.themes/plugin.properties | 3 -- 9 files changed, 28 insertions(+), 61 deletions(-) diff --git a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java index f285d02930e..48665933ad1 100644 --- a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java +++ b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertyUnselectedTabsSWTHandler.java @@ -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) { @@ -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); @@ -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)) { diff --git a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css index bab4f2efab1..dde40650e72 100644 --- a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css +++ b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_ide_colorextensions.css @@ -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', '#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', @@ -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', @@ -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; - 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'; @@ -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; - 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'; diff --git a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_tabstyle.css b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_tabstyle.css index 1f6940f5634..ad39a1c0254 100644 --- a/bundles/org.eclipse.ui.themes/css/dark/e4-dark_tabstyle.css +++ b/bundles/org.eclipse.ui.themes/css/dark/e4-dark_tabstyle.css @@ -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; diff --git a/bundles/org.eclipse.ui.themes/css/e4_default_gtk.css b/bundles/org.eclipse.ui.themes/css/e4_default_gtk.css index 0aea239e0f9..ab340f254d5 100644 --- a/bundles/org.eclipse.ui.themes/css/e4_default_gtk.css +++ b/bundles/org.eclipse.ui.themes/css/e4_default_gtk.css @@ -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; } @@ -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; } diff --git a/bundles/org.eclipse.ui.themes/css/e4_default_mac.css b/bundles/org.eclipse.ui.themes/css/e4_default_mac.css index 542766200ef..c9f2cca9c85 100644 --- a/bundles/org.eclipse.ui.themes/css/e4_default_mac.css +++ b/bundles/org.eclipse.ui.themes/css/e4_default_mac.css @@ -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; } diff --git a/bundles/org.eclipse.ui.themes/css/e4_default_win.css b/bundles/org.eclipse.ui.themes/css/e4_default_win.css index 5b29c031379..0708ac6ee48 100644 --- a/bundles/org.eclipse.ui.themes/css/e4_default_win.css +++ b/bundles/org.eclipse.ui.themes/css/e4_default_win.css @@ -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; } @@ -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; } diff --git a/bundles/org.eclipse.ui.themes/css/light/e4-light_ide_colorextensions.css b/bundles/org.eclipse.ui.themes/css/light/e4-light_ide_colorextensions.css index 836ac2965ef..967b91c65ae 100644 --- a/bundles/org.eclipse.ui.themes/css/light/e4-light_ide_colorextensions.css +++ b/bundles/org.eclipse.ui.themes/css/light/e4-light_ide_colorextensions.css @@ -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', @@ -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'; @@ -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'; diff --git a/bundles/org.eclipse.ui.themes/css/light/e4-light_tabstyle.css b/bundles/org.eclipse.ui.themes/css/light/e4-light_tabstyle.css index 865e51330aa..e75c803deee 100644 --- a/bundles/org.eclipse.ui.themes/css/light/e4-light_tabstyle.css +++ b/bundles/org.eclipse.ui.themes/css/light/e4-light_tabstyle.css @@ -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'; @@ -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'; diff --git a/bundles/org.eclipse.ui.themes/plugin.properties b/bundles/org.eclipse.ui.themes/plugin.properties index 2479e46ebf4..c449218d5ff 100644 --- a/bundles/org.eclipse.ui.themes/plugin.properties +++ b/bundles/org.eclipse.ui.themes/plugin.properties @@ -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 From 54f1d11b0a5b1509687c58b031929a92785da4ed Mon Sep 17 00:00:00 2001 From: Eclipse Platform Bot Date: Mon, 24 Aug 2026 12:18:11 +0000 Subject: [PATCH 2/2] Version bump(s) for 4.41 stream --- bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF index 6d2683ea5e0..c871b619c3a 100644 --- a/bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.ui.themes/META-INF/MANIFEST.MF @@ -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