Style CTabFolder pages that are hidden when they are skinned - #4331
Open
vogella wants to merge 1 commit into
Open
Style CTabFolder pages that are hidden when they are skinned#4331vogella wants to merge 1 commit into
vogella wants to merge 1 commit into
Conversation
Contributor
Test Results 858 files ±0 858 suites ±0 1h 2m 47s ⏱️ + 6m 41s Results for commit 9f90fae. ± Comparison against base commit c249437. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Contributor
Author
vogella
marked this pull request as ready for review
September 1, 2026 15:27
vogella
force-pushed
the
ctabfolder-page-initial-styling
branch
from
September 1, 2026 15:29
904b52a to
e7045c4
Compare
The Search dialog opened unstyled until a tab was switched. A CTabFolder exposes only the page of its selected tab to the CSS engine, and applyStyles skips an element that is not visible. SearchDialog attaches its page before selecting the tab, so the page is hidden during the skin pass, and the programmatic setSelection that follows fires no selection event. A page whose creation runs the event loop is skinned before it is attached at all, and attaching it to an already selected tab sends no show event either. Watch a skipped CTabFolder child for the resize or show that makes it the selected tab's page and style it then. Also drop the swt-simple test: curved tabs are gone, so getSimple() always returns true and the assertion tested nothing. Assisted-by: multiple AI agents and layers of automated tooling 🤖
vogella
force-pushed
the
ctabfolder-page-initial-styling
branch
from
September 3, 2026 11:15
e7045c4 to
9f90fae
Compare
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.


The Search dialog opens unstyled in the dark theme and only picks up the theme once a tab is switched. A CTabFolder exposes only the page of its selected tab to the CSS engine, and applyStyles skips elements that are not visible. SearchDialog attaches its page before selecting the tab, so the page is hidden during the skin pass, and the programmatic setSelection afterwards fires no selection event. A page whose creation runs the event loop is skinned before it is attached at all, and attaching it to an already selected tab sends no show event either.
CSSSWTApplyStylesListener now watches a skipped CTabFolder child for the resize or show that makes it the selected tab's page and styles it then. CTabFolderElement is the only ChildVisibilityAwareElement, so this covers the whole class of the problem.
Two CTabFolderTest cases mirror the dialog's two sequences and fail without the fix. The swt-simple test is dropped, curved tabs are gone and getSimple() always returns true. Verified with CTabFolderTest (21 tests) on Linux.