From e6f6c5dc1c49a875b876f3bfedf2c0c8f02b7a3e Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Mon, 24 Aug 2026 11:20:20 +0200 Subject: [PATCH] [GTK] Neutralize horizontal ToolBar padding SWT's theming fixes zero the top and bottom padding of a GTK toolbar but leave the left and right padding to the theme. Where two ToolBars sit side by side, each contributes its own padding at the seam, so the item pitch across the boundary is larger than within a bar. Measured with Ubuntu Yaru, 27 within a bar and 34 across a boundary; with this change every pitch is a uniform 27. This also removes the leading inset from every ToolBar, shifting the first item 4px left. The pitch between items is unaffected. Fixes https://github.com/eclipse-platform/eclipse.platform.swt/issues/3536 --- .../eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css index 04c9ef1b2f4..4619cc07191 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css @@ -1,6 +1,10 @@ +/* Horizontal padding is neutralized so that adjacent ToolBars keep the same item + pitch as items within a single ToolBar. */ toolbar { padding-top: 2px; padding-bottom: 2px; + padding-left: 0px; + padding-right: 0px; } toolbar button {