[GTK3] Keep ToolBar preferred size stable when it is squeezed - #3609
Merged
vogella merged 1 commit intoSep 21, 2026
Merged
Conversation
GTK 3 tool bars keep GtkToolbar's default overflow arrow since the show_arrow toggling was removed. While a tool bar is allocated less than it needs, the arrow enlarges its preferred height, so a CTabFolder laying out its top right tool bar during a transient narrow layout (as on a perspective switch) wraps it below the tabs until the next resize. Disable the overflow arrow once at creation, so the preferred size no longer depends on the allocation and nothing is toggled per measurement. Fixes eclipse-platform#3608 Assisted-by: multiple AI agents and layers of automated tooling 🤖
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.
Since the show_arrow toggling was removed in 4.40, GTK 3 tool bars keep GtkToolbar's default overflow arrow, which enlarges the preferred height while a tool bar is allocated less than it needs. On a perspective switch, view tool bars in a CTabFolder's top right are briefly squeezed like this, and the folder then wraps them below the tabs until the next resize. This change disables the overflow arrow once when the tool bar is created, so its preferred size no longer depends on its allocation and nothing is toggled per measurement, which keeps the idle CPU fix for #3236 intact. A new CTabFolder test reproduces the problem headless on GTK 3/X11: it fails without the change and passes with it, and the CTabFolder, ToolBar, ToolItem and CoolBar test classes pass. I have not checked it in a full IDE.
Fixes #3608