Repository navigation
Lay out tab folder content when the CTabRendering padding changes - #4614
Merged
HeikoKlare merged 1 commit intoDec 6, 2026
Conversation
HeikoKlare
added a commit
to HeikoKlare/eclipse.platform.ui
that referenced
this pull request
Dec 5, 2026
With no editor open, an editor stack shows the perspective's onboarding information in an area that covers the empty folder. That area was placed with fixed offsets that assume one tab height and a thin border, so it covered the frame of tab renderers with a different trim, such as the rounded lower corners of a renderer that draws rounded frames, and it was misplaced for other tab heights. The onboarding area now fills exactly the space the folder leaves for its content, so the folder's tabs and frame stay visible for any tab height and renderer, also when the tab height, the renderer or its padding changes at runtime. The container is laid out in the folder's client area, which leaves out the tabs and the frame the renderer draws, and is updated on the folder's resize event. Following a new tab height or renderer relies on CTabFolder sending that event for every change of its client area, which SWT does since eclipse-platform/eclipse.platform.swt#3906, and following a padding change relies on CTabRendering sending it, which eclipse-platform#4614 adds. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed, as nothing uses them anymore and the package is exported to friends only. A client area change that sends no resize event, such as one of a renderer that changes its trim on its own and only redraws, is not followed. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
HeikoKlare
force-pushed
the
ctabrendering-padding-notifies-client-area
branch
from
December 5, 2026 11:08
bf3064d to
593603b
Compare
HeikoKlare
added a commit
to HeikoKlare/eclipse.platform.ui
that referenced
this pull request
Dec 5, 2026
With no editor open, an editor stack shows the perspective's onboarding information in an area that covers the empty folder. That area was placed with fixed offsets that assume one tab height and a thin border, so it covered the frame of tab renderers with a different trim, such as the rounded lower corners of a renderer that draws rounded frames, and it was misplaced for other tab heights. The onboarding area now fills exactly the space the folder leaves for its content, so the folder's tabs and frame stay visible for any tab height and renderer, also when the tab height, the renderer or its padding changes at runtime. The container is laid out in the folder's client area, which leaves out the tabs and the frame the renderer draws, and is updated on the folder's resize event. Following a new tab height or renderer relies on CTabFolder sending that event for every change of its client area, which SWT does since eclipse-platform/eclipse.platform.swt#3906, and following a padding change relies on CTabRendering sending it, which eclipse-platform#4614 adds. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed, as nothing uses them anymore and the package is exported to friends only. A client area change that sends no resize event, such as one of a renderer that changes its trim on its own and only redraws, is not followed. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Updates Eclipse’s tab renderer so runtime padding changes immediately reposition selected-tab content and notify resize listeners. This supports the editor onboarding placement changes in #4556.
Changes:
- Trigger resize notification and layout only when padding changes the folder’s client area.
- Add tests for content bounds, resize notification, and unchanged padding.
| File | Description |
|---|---|
| tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRenderingTest.java | Tests content layout and resize events after padding updates. |
| bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java | Notifies listeners and lays out content when padding changes the client area. |
Review effort: Balanced
Contributor
HeikoKlare
marked this pull request as ready for review
December 5, 2026 15:54
When a theme or a CSS rule changes the padding of a tab folder at runtime, for example on a theme switch, the content of the selected tab keeps its old bounds until the folder is resized: it overlaps the new padding or leaves a gap next to it. Code that follows the folder's content area through its resize event, such as the editor onboarding area, is not told about the change either. A padding change that alters the folder's content area now lays out the selected tab's content right away and notifies the folder's resize listeners, the same way the folder reports a content area change it causes itself, for example through a new tab height. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
HeikoKlare
added a commit
to HeikoKlare/eclipse.platform.ui
that referenced
this pull request
Dec 5, 2026
With no editor open, an editor stack shows the perspective's onboarding information in an area that covers the empty folder. That area was placed with fixed offsets that assume one tab height and a thin border, so it covered the frame of tab renderers with a different trim, such as the rounded lower corners of a renderer that draws rounded frames, and it was misplaced for other tab heights. The onboarding area now fills exactly the space the folder leaves for its content, so the folder's tabs and frame stay visible for any tab height and renderer, also when the tab height, the renderer or its padding changes at runtime. The container is laid out in the folder's client area, which leaves out the tabs and the frame the renderer draws, and is updated on the folder's resize event. Following a new tab height or renderer relies on CTabFolder sending that event for every change of its client area, which SWT does since eclipse-platform/eclipse.platform.swt#3906, and following a padding change relies on CTabRendering sending it, which eclipse-platform#4614 adds. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed, as nothing uses them anymore and the package is exported to friends only. A client area change that sends no resize event, such as one of a renderer that changes its trim on its own and only redraws, is not followed. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
HeikoKlare
force-pushed
the
ctabrendering-padding-notifies-client-area
branch
from
December 5, 2026 16:34
593603b to
28fb1a0
Compare
HeikoKlare
added a commit
to HeikoKlare/eclipse.platform.ui
that referenced
this pull request
Dec 6, 2026
With no editor open, an editor stack shows the perspective's onboarding information in an area that covers the empty folder. That area was placed with fixed offsets that assume one tab height and a thin border, so it covered the frame of tab renderers with a different trim, such as the rounded lower corners of a renderer that draws rounded frames, and it was misplaced for other tab heights. The onboarding area now fills exactly the space the folder leaves for its content, so the folder's tabs and frame stay visible for any tab height and renderer, also when the tab height, the renderer or its padding changes at runtime. The container is laid out in the folder's client area, which leaves out the tabs and the frame the renderer draws, and is updated on the folder's resize event. Following a new tab height or renderer relies on CTabFolder sending that event for every change of its client area, which SWT does since eclipse-platform/eclipse.platform.swt#3906, and following a padding change relies on CTabRendering sending it, which eclipse-platform#4614 adds. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed, as nothing uses them anymore and the package is exported to friends only. A client area change that sends no resize event, such as one of a renderer that changes its trim on its own and only redraws, is not followed. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
What & Why
When a theme or a CSS rule changes the padding of a tab folder at runtime, for example on a theme switch, the content of the selected tab keeps its old bounds until the folder is resized: it overlaps the new padding or leaves a gap next to it. Code that follows the folder's content area through its resize event, such as the editor onboarding area, is not told about the change either. CTabFolder reports content area changes it causes itself (since eclipse-platform/eclipse.platform.swt#3906 for all of them), but the padding is state of its renderer, which the folder cannot observe.
A padding change of CTabRendering that alters the folder's content area now lays out the selected tab's content right away and notifies the folder's resize listeners, the same way CTabFolder reports such a change itself. A padding change that leaves the content area as it is notifies nobody.
This is a prerequisite for #4556, which relies on the resize event to keep the editor onboarding area in place.
How to test
The selected tab's content follows a padding change at runtime.
CTabFolder { padding: 10px; }.Screenshots
The same tab folder with CTabRendering and a red tab content after its padding changed from 0 to 30 px at runtime: on the left without this change (the content still covers the new padding and the frame), on the right with it (the content is inset by the padding).