Closed Bug 1148911 Opened 9 years ago Closed 5 years ago

Nontransparent download progress bar in OS X Yosemite

Categories

(Core :: Widget: Cocoa, defect, P3)

36 Branch
x86
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 1386046

People

(Reporter: phosphide, Assigned: gvescu)

References

Details

Attachments

(4 files)

Attached image progressbar.png
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150320202338

Steps to reproduce:

Start downloading a file


Actual results:

The progress bar has white opaque background (see attached screenshot), tested on a fresh Yosemite install with fresh Firefox profile, also tested with Nightly 39.0a1.


Expected results:

The border around the progress bar should be transparent.
Component: Untriaged → Theme
It happens to me too. Firefox 37.0.2 on OS X 10.10.3 Yosemite.

Seems like a bug since progress bars on Yosemite have less height. On Mavericks looks fine.
Finally looked at the code and figured out what happened here.

The rect made for the progress bar is still using the pre-Yosemite size, so the new Yosemite styled progress bar aligns itself right in the middle, revealing all the empty space around. This only happens on Yosemite, of course. On Mavericks looks fine.

After a while I (kinda) fixed it. Will post a patch as soon as I clean up the code. However, the progress bar still looks weird considering the new height on Yosemite and given that maybe Apple won't change it in a long time. Maybe we need a new kind of download indicator like the Chrome "download pie".
This is the first solution I've found. It's not that elegant, but it gets the job done for now.

It uses AppKit for detecting the OS X version at runtime. If it's Mavericks or pre-Mavericks doesn't do anything to what it is now, but if it is Yosemite it will use a different height for the progress bar background.
Attachment #8607341 - Flags: review?(gavin.sharp)
Attachment #8607341 - Flags: review?(smichaud)
Attachment #8607341 - Flags: review?(mstange)
Attachment #8607341 - Flags: review?(gavin.sharp)
Assignee: nobody → gvescu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I won't be able to get to this review right away.  With luck it'll be sometime next week.
Comment on attachment 8607341 [details] [diff] [review]
Proposed patch v1

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

::: widget/cocoa/nsMacDockSupport.mm
@@ +156,3 @@
>      [mProgressBackground lockFocus];
> +    [[NSColor clearColor] set];
> +    NSRectFill(NSRectFromCGRect(mProgressBoundsMask));

Why did you choose not to clear the whole mProgressBounds?

I think just changing "whiteColor" to "clearColor" should be all that's necessary to fix this bug.
Attachment #8607341 - Flags: review?(smichaud)
Attachment #8607341 - Flags: review?(mstange)
Just putting clearColor doesn't do, it just makes a clear transparent space (clipping the logo) instead of the white space we see here: https://bugzilla.mozilla.org/attachment.cgi?id=8596204. That's why I choose to reduce the bounds of it.
However, now that you mention it, I'll try to skip the drawing of the mProgressBounds space if it's Yosemite. Might post another patch later :)
Oh, I see the problem now. Can we store the icon without the progress bar in a different buffer, so that we can always recomposite both original images? Then we don't have to worry about getting the bounds of the progress bar right.
I think it might be possible to remove the white space drawing altogether. The redraw function for the progress bar just need the mProgressBounds rect values.

Something I noticed last night is that the white background seems to be just for make the downloading progress bar more noticeable. Just look at the result of my fix using clearColor: https://bugzilla.mozilla.org/attachment.cgi?id=8607327. With whiteColor it would be better, but we'll have to clip again to make it have round corners.

Again, I'll try removing the rect drawing when I get home. I guess it would be a better solution than guessing the bounds.
Any news on this? Almost a year later since the last comment (with a nice screenshot!) I still get that progress bar inside a white rectangle.
Still unresolved on 52.0 ESR. Would be great if this could be solved or - in case this is not possible short term - if an option to disable the progress bar on the dock icon be added. I do not find it all that useful personally and rather don't see it at all than in it's current form...
Oh, how about replacing the progress bar with a native macOS feature, those little numbers in a red circle that you get e.g. when Mail has unread messages? Clear the counter when the download window has been opened after the download completed, maybe...
Component: Theme → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → Widget: Cocoa
Priority: -- → P3

I was not aware of this bug and this has been fixed in bug 1386046. If there is any additional work required we should file new followup bugs. Closing as dupe of bug 1386046.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: