Closed
Bug 1055576
Opened 10 years ago
Closed 10 years ago
Factor out code to draw tab curves
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: lucasr, Assigned: lucasr)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
So that we can reuse it from different places in our code base.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8475213 [details] [diff] [review]
Factor out code to draw tab curves (r=mcomella)
I'll land this directly in m-c.
Attachment #8475213 -
Flags: review?(michael.l.comella)
Comment 3•10 years ago
|
||
Comment on attachment 8475213 [details] [diff] [review]
Factor out code to draw tab curves (r=mcomella)
Review of attachment 8475213 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/tabs/TabCurve.java
@@ +40,5 @@
> + from + width * 0.723f * dir.value, height * 0.961f,
> + from + width * dir.value, height);
> + }
> +
> + public static void drawFromBottom(Path path, int from, int height, Direction dir) {
This is unused - when might we want to draw from the bottom?
I can't double-check these constants because I don't know where they come from, but I'm surprised they're not shared with drawFromTop.
::: mobile/android/base/toolbar/ShapedButton.java
@@ -72,4 @@
> mPath.lineTo(width, height);
> mPath.lineTo(width, 0);
> mPath.lineTo(0, 0);
> } else if (mSide == CurveTowards.LEFT) {
You should also use the TabCurve method here in CurveTowards.LEFT, right?
Attachment #8475213 -
Flags: review?(michael.l.comella) → feedback+
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #3)
> Comment on attachment 8475213 [details] [diff] [review]
> Factor out code to draw tab curves (r=mcomella)
>
> Review of attachment 8475213 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mobile/android/base/tabs/TabCurve.java
> @@ +40,5 @@
> > + from + width * 0.723f * dir.value, height * 0.961f,
> > + from + width * dir.value, height);
> > + }
> > +
> > + public static void drawFromBottom(Path path, int from, int height, Direction dir) {
>
> This is unused - when might we want to draw from the bottom?
This is used in the tab strip.
> I can't double-check these constants because I don't know where they come
> from, but I'm surprised they're not shared with drawFromTop.
Good point, let me see if we can share some values between both methods.
> ::: mobile/android/base/toolbar/ShapedButton.java
> @@ -72,4 @@
> > mPath.lineTo(width, height);
> > mPath.lineTo(width, 0);
> > mPath.lineTo(0, 0);
> > } else if (mSide == CurveTowards.LEFT) {
>
> You should also use the TabCurve method here in CurveTowards.LEFT, right?
Nope. This is used by the current tablet UI and should remain unchanged. I'll add a comment about this for now. Filed bug 1056012 to split the tablet and phone implementations more clearly.
ps: there's a lot of historical cruft/nonsense in the ShapedButton code and subclasses. Definitely needs some cleanups but it's not urgent.
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8475856 [details] [diff] [review]
Factor out code to draw tab curves (r=mcomella)
Now sharing the multipliers between drawFromTop and drawFromBottom.
Attachment #8475856 -
Flags: review?(michael.l.comella)
Assignee | ||
Updated•10 years ago
|
Attachment #8475213 -
Attachment is obsolete: true
Updated•10 years ago
|
Attachment #8475856 -
Flags: review?(michael.l.comella) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•