Skip to content

Prevent CTabFolder chevron and min/max toolbars from overlapping - #3683

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabfolder-toolbar-overlap
Open

vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabfolder-toolbar-overlap

Conversation

@vogella

@vogella vogella commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

When the chevron of a CTabFolder is shown for the first time, setItemSize measured the chevron tool bar before its image was set, so it reserved less room than the final chevron needs. The selected tab then kept too much width and the chevron ran into the right-aligned min/max tool bar, which made test_childControlOverlap fail on GTK3 depending on the font. The chevron image is now created before the chevron is measured, in both the multi-tab and the SWT.SINGLE layout. A new test sweeps folder widths and font sizes on freshly created folders, and the overlap check now reports which elements overlap.

See #2855

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

  224 files  ±0    224 suites  ±0   25m 36s ⏱️ + 1m 4s
5 009 tests +1  4 981 ✅ +1   28 💤 ±0  0 ❌ ±0 
7 356 runs  +6  7 162 ✅ +6  194 💤 ±0  0 ❌ ±0 

Results for commit 9d5f209. ± Comparison against base commit 2d0a81a.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The SWT.SINGLE regression path does not select an item, so it misses the affected selected-tab sizing logic.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Prevents CTabFolder chevron and min/max toolbar overlap by sizing the chevron after its image is available.

Changes:

  • Initializes the chevron image before measuring it.
  • Adds width/font regression coverage and clearer overlap diagnostics.
File Description
CTabFolder.java Corrects chevron measurement timing.
Test_org_eclipse_swt_custom_CTabFolder.java Adds overlap regression coverage and diagnostics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

When the chevron is shown for the first time, setItemSize measured the chevron tool bar before its image was set, so it reserved less room than the final chevron needs.
The selected tab then kept too much width and the chevron ran into the right-aligned min/max tool bar, depending on the font.
The chevron image is now created before the chevron is measured.

See eclipse-platform#2855

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@vogella
vogella force-pushed the ctabfolder-toolbar-overlap branch from 0952c17 to 9d5f209 Compare October 7, 2026 06:59
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.

2 participants