Skip to content

Clear the CTabFolder background gradient in setBackground(Color) - #3592

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabfolder-solid-background-clears-gradient
Open

vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:ctabfolder-solid-background-clears-gradient

Conversation

@vogella

@vogella vogella commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

CTabFolder.setBackground(Color) kept a gradient set earlier, so the folder continued to paint gradient images behind the controls in its tab row. In the IDE this showed up as toolbar buttons of an inactive part stack with mismatched backgrounds: controls without their own colour showed the stale gradient, the others the solid colour. setBackground(Color) now clears the gradient, as CLabel already does. A new CTabFolder test fails without the change and passes with it, and the existing CTabFolder tests pass on GTK.

CTabFolder.setBackground(Color) kept a gradient set earlier, so the
folder continued to paint gradient images behind the controls in its
tab row. Controls without their own colour showed the stale gradient
while the others showed the solid colour, which gave toolbar buttons of
an inactive part stack mismatched backgrounds.

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

Copy link
Copy Markdown
Contributor

Test Results

  212 files  ±0    212 suites  ±0   28m 43s ⏱️ -31s
4 958 tests +1  4 931 ✅ +1   27 💤 ±0  0 ❌ ±0 
7 181 runs  +6  6 995 ✅ +6  186 💤 ±0  0 ❌ ±0 

Results for commit aa66049. ± Comparison against base commit 24f40bd.

@vogella

vogella commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Without this you end up with artifacts if the old theme used a gradient and the new theme sets the background.

Screenshot From 2026-09-15 15-26-38 Screenshot From 2026-09-15 15-27-19

Corrected:

Screenshot From 2026-09-15 16-39-04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Gradient state is mutated before superclass argument and widget validation succeeds.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Clears stale CTabFolder gradients when setting a solid background.

Changes:

  • Resets gradient state for solid backgrounds.
  • Adds regression coverage for tab-row controls.
File summaries
File Description
CTabFolder.java Clears gradient state and refreshes backgrounds.
Test_org_eclipse_swt_custom_CTabFolder.java Tests replacing a gradient with a solid color.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +2388 to +2390
gradientColors = null;
gradientPercents = null;
gradientVertical = false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than this one, this PR is good to go.

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.

3 participants