Skip gradient image for flat look in FormHeading and CSS handler#3808
Merged
vogella merged 2 commits intoeclipse-platform:masterfrom Mar 30, 2026
Merged
Skip gradient image for flat look in FormHeading and CSS handler#3808vogella merged 2 commits intoeclipse-platform:masterfrom
vogella merged 2 commits intoeclipse-platform:masterfrom
Conversation
Contributor
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Contributor
54d9573 to
9cf24cd
Compare
Contributor
Author
|
Rebased onto eclipse/master and resolved merge conflicts in FlatLookTest.java. Fixed a bug in the FormHeading optimization where the background image wasn't being cleared correctly in all cases. Verified with mvn clean verify in forms test bundle. |
50e467e to
ef413c9
Compare
…andler FormHeading.setTextBackground now detects when all gradient colors are identical and uses a solid background instead of generating a gradient image. This avoids unnecessary image allocation and rendering overhead for flat themes. CSSPropertyFormHandler now simplifies identical-color gradient lists from CSS into a single-color array before passing to the form widget, preventing unnecessary gradient processing downstream. Fixes eclipse-platform#3803
Section.updateHeaderImage now detects when the gradient color equals the title bar background and skips creating the gradient image entirely. This avoids unnecessary image allocation and tiling for flat themes where both CSS properties are set to the same value.
ef413c9 to
8dbb1d7
Compare
vogella
added a commit
to vogella/eclipse.platform.ui
that referenced
this pull request
Apr 30, 2026
Section.updateHeaderImage was skipping the title-bar image whenever the title-bar gradient color matched the title-bar background color. That condition is too loose: the title-bar background is typically set distinct from the section body (e.g. #eaeaea on a #ffffff body in the light theme) and the image was what painted that contrast across the title-bar area. After the optimization fired, the title bar collapsed into the section body color and the visual cue was gone. Tighten the short-circuit to require all three of gradient color, title-bar background and section body background to be equal before skipping the image. This preserves the optimization for genuinely flat sections while restoring the prior look when the title-bar is meant to contrast with the body. Fixes eclipse-platform#3945
vogella
added a commit
that referenced
this pull request
Apr 30, 2026
Section.updateHeaderImage was skipping the title-bar image whenever the title-bar gradient color matched the title-bar background color. That condition is too loose: the title-bar background is typically set distinct from the section body (e.g. #eaeaea on a #ffffff body in the light theme) and the image was what painted that contrast across the title-bar area. After the optimization fired, the title bar collapsed into the section body color and the visual cue was gone. Tighten the short-circuit to require all three of gradient color, title-bar background and section body background to be equal before skipping the image. This preserves the optimization for genuinely flat sections while restoring the prior look when the title-bar is meant to contrast with the body. Fixes #3945
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.
Summary
setTextBackground): Detect when all gradient colors are identical and usesetBackground(color)instead of generating a gradient image viaFormImages. This avoids unnecessaryImageallocation and GC rendering for flat themes.These changes implement Levels 1 and 4 from #3803, complementing the Level 2/3 changes in #3807.
Fixes #3803
Test plan
text-background-colorwith identical gradient stops uses solid backgroundtext-background-colorwith distinct gradient stops still creates gradient🤖 Generated with Claude Code