Always use white color for headerbar text
ClosedPublic

Authored by ngraham on Aug 5 2019, 2:36 PM.

Details

Summary

Elisa uses the color scheme's highlighted text color for headerbar labels. This is not
semantically correct since this color relies on being above the color scheme's highlight
color to ensure adequate contrast. However the headerbar's blur does not do this; rather,
it always produces a dark-ish color. This causes issues for color schemes where the
highlight is light and the highlightext text color is dark, such as Materia Light.

This patch fixes the problem by always using a hardcoded white color, which always looks
good against the dark-ish blurry headerbar.

BUG: 410560

Test Plan

Now looks good with the previously problematic Materia Light color scheme:

Worst-case scenario for contrast with white album art; headerbar still darkens it enough to make the text easily visible:

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham requested review of this revision.Aug 5 2019, 2:36 PM
ngraham created this revision.
ngraham edited the summary of this revision. (Show Details)Aug 5 2019, 2:36 PM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)Aug 5 2019, 2:41 PM

Thanks. Is it not easier to read with the glow?
I realize it was not consistently used.
Could you test with it everywhere?

ngraham added a comment.EditedAug 5 2019, 7:01 PM

I think it's actually easier to read without it because the text is more crisp. The glow was using the wrong color anyway (glows need to be bright). A dark color made it look like a weird omnidirectional shadow. I tried turning the glow into a shadow but it looked weird to me because it made the text feel like it was floating above the background rather than integrated within it.

ngraham added a comment.EditedAug 5 2019, 7:37 PM

There's also the option of using a dark outline around the text. This tends to look fine for large text but becomes distracting and bad-looking for small text.

This patch:

This patch plus black outlines around the labels:

That, but with larger text for the smallest labels:

I'm not sure that any extra contrast aids are really needed if we just make the text always white.

mgallien accepted this revision.Aug 5 2019, 8:22 PM

I am convinced. Thanks

This revision is now accepted and ready to land.Aug 5 2019, 8:22 PM
This revision was automatically updated to reflect the committed changes.