Skip to content

[CTabFolder] Add per-item background colors to CTabItem - #3866

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabitem-background
Open

vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabitem-background

Conversation

@vogella

@vogella vogella commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

CTabItem gets setBackground and setSelectionBackground, mirroring the existing setForeground and setSelectionForeground pair. Applications such as DBeaver color editor tabs per connection and today have to subclass the renderer and reach into private fields of CTabItem and the renderer, including emptying closeRect to hide the folder-colored patch behind the close button.

The default renderer now fills a tab with its item color, unselected or selected, and uses that color behind the hidden close button. Getters return the item's own color or null, so callers can tell an own color from the inherited one, and items without own colors render exactly as before. Snippet396 shows tabs with different colors, and the new tests cover the API contract plus a pixel check of the painted tabs.

CTabItem gets setBackground and setSelectionBackground, mirroring the foreground pair, so applications can color single tabs (for example per database connection) without subclassing the renderer and reaching into private fields. The renderer fills the tab and the hidden close button area with the item color. Items without own colors render as before.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 1 102 files  ± 0   1 102 suites  ±0   1h 27m 20s ⏱️ - 4m 55s
 5 235 tests + 4   5 207 ✅ + 4     28 💤 ±0  0 ❌ ±0 
30 958 runs  +24  27 726 ✅ +24  3 232 💤 ±0  0 ❌ ±0 

Results for commit 61a33a3. ± Comparison against base commit 33f0960.

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.

1 participant