Closed Bug 656909 Opened 13 years ago Closed 13 years ago

Use a native rendering for vertical progress bar (Windows)

Categories

(Core :: Widget: Win32, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file, 1 obsolete file)

I will try to have a render that looks like the horizontal one but vertical.
Jim, do you know of any Windows app using vertical progress bars?
Attached patch Patch v1 (obsolete) — Splinter Review
As said in a comment, it doesn't look as nice as horizontal progress bars. I suppose not a lot of people are using vertical progress bars...
There is also an overflow on the right but I will try to fix that in another bug.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #532220 - Flags: review?(jmathies)
By the way, Jim, it's the last patch blocking vertical progress bar to be pushed in the tree. It would be great if you can review it before Firefox 6 branching :)
Whiteboard: [needs review]
Shouldn't we mark this as dependent of bug 656284? I'd really like to see that fixed before we land more progress meter work.
(In reply to comment #3)
> Shouldn't we mark this as dependent of bug 656284? I'd really like to see
> that fixed before we land more progress meter work.

I don't think we should worry about that. This patch isn't making the issue in bug 656284 worse or better. I think you can review it safely and I might wait for bug 656284 to be fixed before pushing. I want both patches to be in Firefox 6.
Jim, now that bug 656284 is fixed, I'm going to push the vertical progress bar support on trunk. It would be nice if you could make sure the review of the patch is done this week so I can push it before Firefox 6 branching.
Comment on attachment 532220 [details] [diff] [review]
Patch v1

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

Do the tests you've written previously cover this new progress alignment?

::: widget/src/windows/nsNativeThemeWin.cpp
@@ +1590,5 @@
> +                                       ? indeterminate
> +                                         ? kProgressVerticalIndeterminateOverlaySize
> +                                         : kProgressVerticalOverlaySize
> +                                       : kProgressHorizontalVistaOverlaySize
> +                                     : kProgressHorizontalXPOverlaySize;

This is getting hard to read, can you break this out into a set of bracketed if statements.

@@ +1633,2 @@
>                                   state, &overlayRect, &clipRect);
>      }

Same thing here.
(In reply to comment #6)
> Comment on attachment 532220 [details] [diff] [review] [review]
> Patch v1
> 
> Review of attachment 532220 [details] [diff] [review] [review]:
> -----------------------------------------------------------------
> 
> Do the tests you've written previously cover this new progress alignment?

There is no windows specific test because on Windows Vista and 7 the progress element is animated thus can't be used in a reftest.
But they are tests covering that for non-native progress bars.


> ::: widget/src/windows/nsNativeThemeWin.cpp
> @@ +1590,5 @@
> > +                                       ? indeterminate
> > +                                         ? kProgressVerticalIndeterminateOverlaySize
> > +                                         : kProgressVerticalOverlaySize
> > +                                       : kProgressHorizontalVistaOverlaySize
> > +                                     : kProgressHorizontalXPOverlaySize;
> 
> This is getting hard to read, can you break this out into a set of bracketed
> if statements.

Sure, will do.

> @@ +1633,2 @@
> >                                   state, &overlayRect, &clipRect);
> >      }
> 
> Same thing here.
Comment on attachment 532220 [details] [diff] [review]
Patch v1

r+ w/the code cleanup previously mentioned.
Attachment #532220 - Flags: review?(jmathies) → review+
Attached patch Patch to checkinSplinter Review
Attachment #532220 - Attachment is obsolete: true
Pushed:
http://hg.mozilla.org/mozilla-central/rev/cef02273a027
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: