Repository navigation
Conversation
Use the per-item background color APIs added to CTabItem in SWT 3.137.0 (eclipse-platform/eclipse.platform.swt#3866) so Eclipse RCP applications can color individual tabs without subclassing CTabRendering with reflection: - Bump org.eclipse.swt minimum version to [3.137.0,4.0.0) in org.eclipse.e4.ui.workbench.renderers.swt and org.eclipse.e4.ui.css.swt. - Render CTabItem.getSelectionBackground() and CTabItem.getBackground() in CTabRendering across selected, unselected, hovered, single-tab, SWT.BOTTOM, and inactive folder states while keeping the content area behind editor composites folder-colored and preserving outer keylines. - Add protected getSelectedTabHighlightRGB(CTabItem) and getHotUnselectedTabBackgroundRGB(CTabItem) hooks on CTabRendering with luminance-aware contrasting defaults for colored tabs. - Update CSSPropertyBackgroundSWTHandler to apply solid CTabItem and CTabItem:selected background-color rules per item, check item colors before falling back to CTabFolder on retrieval, and keep folder fallback for CssList gradients. - Track CSS-applied CTabItem background RGBs in CSSSWTColorHelper so CTabItemElement.reset() clears CSS-applied colors on theme switch without clobbering programmatically set item colors. - Migrate built-in Light and Dark themes in org.eclipse.ui.themes off legacy CTabItem background-color rules and exclude CTabItem from dark theme 'Composite > * > *' wildcard rules. - Add pixel tests in CTabRenderingTest and CSS tests in CTabItemTest and CTabItemSelectionTest.
Contributor
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.
Uses the per-item background colors of
CTabItemadded in SWT 3.137.0 (eclipse-platform/eclipse.platform.swt#3866), so RCP applications can color individual tabs through the API or CSS without subclassingCTabRenderingwith reflection.CTabRenderingnow paints these colors and offers two overridable methods for the highlight and hover colors, while tabs without item colors look as before. CSSbackground-colorrules onCTabItemnow apply to the item instead of the whole folder, and the built-in themes are adjusted accordingly.Draft until an I-build provides SWT 3.137.0.