Restore Section title bar background lost after #3808#3946
Open
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Open
Restore Section title bar background lost after #3808#3946vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
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
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.
The flat-look optimization in #3808 added an early return in
Section.updateHeaderImagewhenever the title-bar gradient color matched the title-bar background color. That fired in the common case where the title-bar background is set distinct from the section body (e.g.#eaeaeaon a#ffffffbody), and the image it skipped was what painted that contrast across the title-bar area, so the title bar visually collapsed into the body.Tighten the short-circuit to also require
bg.equals(getBackground()), so the image is only skipped when title-bar gradient, title-bar background and section body background are all the same color. The optimization is preserved for genuinely flat sections; non-flat title bars get their image back.Fixes #3945