Skip to content

[GTK] Neutralize horizontal ToolBar padding - #3537

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:gtk-toolbar-horizontal-padding
Open

[GTK] Neutralize horizontal ToolBar padding#3537
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:gtk-toolbar-horizontal-padding

Conversation

@vogella

@vogella vogella commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #3536.

SWT's GTK theming fixes already zero the vertical toolbar padding but leave the horizontal padding to the theme. That is invisible inside one ToolBar, but where two sit side by side each adds its own padding at the seam, which is why the view toolbar, the view menu and the min/max buttons in every view's tab area are unevenly spaced. With this change the pitch is uniform across the whole strip, and no e4 change is needed.

Worth knowing before merging: this also removes the leading inset from every ToolBar, so the first item shifts 4px left and each bar is 7px narrower. Spacing between items is unchanged.

It is also GTK3-only. On GTK4 the ToolBar is a GtkBox with a toolbar CSS class, so a bare toolbar node selector does not match, which means the existing vertical fix is already inert there. I would rather handle that separately than add unverified CSS here.

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 eclipse-platform#3536
@github-actions

Copy link
Copy Markdown
Contributor

Test Results (linux)

  109 files  +   36    109 suites  +36   14m 48s ⏱️ + 4m 34s
4 618 tests ±    0  4 390 ✅ ±    0  228 💤 ± 0  0 ❌ ±0 
3 437 runs  +1 137  3 359 ✅ +1 119   78 💤 +18  0 ❌ ±0 

Results for commit e6f6c5d. ± Comparison against base commit 3e3b24b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GTK] Adjacent ToolBars get an uneven item spacer

1 participant