Skip to content

Derive heap status colors from background and foreground - #4280

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:heap-status-derived-colors
Open

Derive heap status colors from background and foreground#4280
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:heap-status-derived-colors

Conversation

@vogella

@vogella vogella commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The heap status kept its paint colors in fields, seeded from hardcoded grays and system colors, and overrode setBackground, setForeground and getForeground to keep those fields in sync. As a result a theme could not restyle the control through the usual means, and getForeground returned a fixed gray rather than the control's actual foreground.

All painted colors except the low-memory red and the free-memory orange now derive from the control's own background and foreground, so the standard background-color and color properties are all a theme needs to set. The border is drawn as one flat rectangle in the derived color instead of a two-tone bevel built from COLOR_WIDGET_HIGHLIGHT_SHADOW.

This also drops ten color fields and the three overrides, and lets the widget pick up an inherited background from the trim, which the old fixed COLOR_WIDGET_BACKGROUND default prevented.

The control cached hardcoded grays and system colors in fields and
overrode setBackground, setForeground and getForeground to keep them in
sync, so themes could not restyle it. All colors except the low-memory
red and the free-memory orange now derive from the control's own
background and foreground.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   51m 1s ⏱️ - 6m 43s
 8 174 tests ±0   7 931 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 768 ✅ ±0  656 💤 ±0  0 ❌ ±0 

Results for commit cc46b10. ± Comparison against base commit f0ef795.

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