Skip to content

[GTK3] Keep ToolBar preferred size stable when it is squeezed - #3609

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:gtk-ctabfolder-topright-3608
Sep 21, 2026
Merged

vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:gtk-ctabfolder-topright-3608

Conversation

@vogella

@vogella vogella commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

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

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 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  212 files  ±0    212 suites  ±0   26m 42s ⏱️ - 3m 44s
4 966 tests +1  4 939 ✅ +1   27 💤 ±0  0 ❌ ±0 
7 204 runs  +6  7 013 ✅ +6  191 💤 ±0  0 ❌ ±0 

Results for commit 7f55465. ± Comparison against base commit 858da5f.

@vogella
vogella merged commit 022432c into eclipse-platform:master Sep 21, 2026
23 checks passed
@vogella
vogella deleted the gtk-ctabfolder-topright-3608 branch September 21, 2026 22:29
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.

CTabFolder: top right control misplaced after switching perspective

1 participant