Skip to content

CTabFolder overlap calculations change#3408

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:ctab
Jun 30, 2026
Merged

CTabFolder overlap calculations change#3408
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:ctab

Conversation

@akurtakov

Copy link
Copy Markdown
Member

Update chevron image before deciding visible tabs so size reservations are correct.

Update chevron image before deciding visible tabs so size reservations
are correct.
@akurtakov

Copy link
Copy Markdown
Member Author

Split from #3403 for wider/independent testing.

@akurtakov akurtakov self-assigned this Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  200 files  ±0    200 suites  ±0   32m 19s ⏱️ + 4m 8s
4 743 tests ±0  4 719 ✅ ±0   24 💤 ±0  0 ❌ ±0 
6 886 runs  ±0  6 718 ✅ ±0  168 💤 ±0  0 ❌ ±0 

Results for commit 364a5b9. ± Comparison against base commit 26547c2.

@HeikoKlare HeikoKlare left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested this on Windows and I don't find anything that breaks with it. I've used both the CustomControlExample for testing CTabFolder as well as an SDK with differently layouted part stacks (using CTabFolders), some with the chevron, some without, also resizing so that it swaps between the two states.

I don't see anything that becomes "better" on Windows, but if I understand correctly that's the intent, as the fix is supposed to improve behavior on Linux, isnt it?

@akurtakov

akurtakov commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

What I traced is that setItemLocation() decides how many tabs fit, reserving space for the chevron via getRightItemEdge(). But the chevron's image (hence its real width) is only set later, in setButtonBounds()->updateChevronImage() leading to tab visibility being computed against a image-less chevron, then the chevron is drawn in its real width and placed right after the last tab causing overlap. I believe that the this PR makes CTabFolder items positioning more stable and less fragile.

@akurtakov

Copy link
Copy Markdown
Member Author

I'll merge so it gets wider testing.

@akurtakov akurtakov merged commit f28f840 into eclipse-platform:master Jun 30, 2026
24 checks passed
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