[GTK] Neutralize horizontal ToolBar padding - #3537
Open
vogella wants to merge 1 commit into
Open
Conversation
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
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
toolbarCSS class, so a baretoolbarnode 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.