Closed Bug 852237 Opened 8 years ago Closed 8 years ago

Tabs button showing wrong color in pressed state

Categories

(Firefox for Android Graveyard :: Theme and Visual Design, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: sriram, Assigned: sriram)

References

Details

Attachments

(2 files)

Android requires different backgrounds for different states. So, a pressed state background is all by itself, and not drawn over a default state. The Bug 848707 changed the pressed (and focused) state from a solid color to a translucent one. Though this might work on phones with h/w acceleration (due to pixel retention), this won't work on s/w model.
Blocks: 848707
Attached patch PatchSplinter Review
Ideally we should do,
<layer>
   <item android:drawable="light_color"/>
   <item android:drawable="20% black"/>
</layer>

But this is more computation for android. Instead, its better to get it the combined value by ourselves, as its a solid color.

Also, LayerDrawable should be used with personas too. However, that requires implementation mutate() for LWThemeDrawable. That doesn't seem a promising case of something under the finger. Hence the pressed and focused state will be solid colors for tabs and menu button with personas enabled.
Attachment #726332 - Flags: review?(mark.finkle)
Attachment #726332 - Flags: review?(mark.finkle) → review+
I missed the tablet part in previous patch. This has it. Can I fold them both and push it as a single changeset?
Attachment #726339 - Flags: review?(mark.finkle)
Comment on attachment 726339 [details] [diff] [review]
Patch (part 2): Tablets

Yes, fold them together
Attachment #726339 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/fbef0319725b
Assignee: nobody → sriram
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.