Closed Bug 1075653 Opened 7 years ago Closed 7 years ago

[10.10] Tooltips should use vibrancy (translucency) on Yosemite

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: Gijs, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There's a partial patch in bug 1045217.
The reason I wasn't able to get vibrancy working was because borderless windows only get vibrancy on those pixels for which the alpha value is at least 1 (of 255), and I was clearing the background completely.
(In reply to Markus Stange [:mstange] from comment #1)
> The reason I wasn't able to get vibrancy working was because borderless
> windows only get vibrancy on those pixels for which the alpha value is at
> least 1 (of 255), and I was clearing the background completely.

How hard is it to fix this? I imagine we'll run into this for the context menus as well...
I have tooltips and context menus working locally now. Cleaning up the patches next...
Attached patch patchSplinter Review
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Attachment #8503215 - Flags: review?(smichaud)
Comment on attachment 8503215 [details] [diff] [review]
patch

This looks fine to me, but I have a nit:

+@interface NSView(NSVisualEffectViewSetState)
+- (void)setState:(NSUInteger)state;
+@end

I can see why you did this.  But it's confusing and needs explanation.

The NSView class doesn't have setState method even on Yosemite, or a state property.  The state property belongs to the NSVisualEffectView class, which is present only on Yosemite (and up), and is only defined when using the Yosemite SDK.  It's in effect undefined using other (earlier) SDKs.  So for usages of it to compile there, you need to add a category as for an undocumented method, and the NSView class is a convenient place to add it.
Attachment #8503215 - Flags: review?(smichaud) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ad2da5715e8

I forgot to add the comment you requested. I'll land it as a follow-up.
https://hg.mozilla.org/mozilla-central/rev/6ad2da5715e8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.