Closed Bug 1107698 Opened 5 years ago Closed 5 years ago

Fix setAlpha in ResizablePathDrawable

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 37
Tracking Status
firefox36 --- fixed
firefox37 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

Details

Attachments

(2 files, 1 obsolete file)

setAlpha(0) will prevent drawing but other values will be full opacity.

This is because setAlpha just overrides the color's alpha value, but we reset the color each time we draw.
Assignee: nobody → michael.l.comella
Status: NEW → ASSIGNED
Comment on attachment 8532254 [details] [diff] [review]
setAlpha after setColor in ResizablePathDrawable

Review of attachment 8532254 [details] [diff] [review]:
-----------------------------------------------------------------

Yep.

::: mobile/android/base/widget/ResizablePathDrawable.java
@@ +58,5 @@
> +        // setAlpha overrides the alpha value in set color. Since we just set the color,
> +        // the alpha value is reset: override the alpha value with the old value.
> +        //
> +        // Note: We *should* be able to setAlpha on the Shape, rather than the Paint, but
> +        // this the opacity doesn't change - dunno why but probably not worth the time.

nit: remove the 'the'
Attachment #8532254 - Flags: review?(lucasr.at.mozilla) → review+
Attachment #8532254 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/82c71c7d725c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Attachment #8532750 - Flags: review?(bnicholson) → review+
re comment 6: I forgot to update the alpha when updating the color.
Depends on: 1109001
Comment on attachment 8532576 [details] [diff] [review]
setAlpha after setColor in ResizablePathDrawable

Applies to parts 1 and 2.

Approval Request Comment
[Feature/regressing bug #]: New tablet release
[User impact if declined]:
  We won't be able to uplift bug 1085771, which means lightweight themes will be unpolished in the new tablet release

[Describe test coverage new/current, TBPL]: None
[Risks and why]: 
  We could cause issues with the alpha channels in the tab strip which, in the worst case means the tabs disappear, but generally means we'll look less polished.

[String/UUID change made/needed]: None
Attachment #8532576 - Flags: approval-mozilla-aurora?
Attachment #8532576 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.