Closed
Bug 448767
Opened 16 years ago
Closed 16 years ago
[Mac] Allow themes to differentiate between Blue and Graphite system appearance color / Add -moz-system-metric(mac-graphite-theme)
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9.1b1
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(3 files, 1 obsolete file)
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
No description provided.
Attachment #331915 -
Flags: superreview?(dbaron)
Attachment #331915 -
Flags: review?(vladimir)
Hi,
Markus = the Mac theme producers best friend
and here is one more example why ;-)
many thanks
Assignee | ||
Comment 2•16 years ago
|
||
Bug 447045 makes this possible.
Attachment #332585 -
Flags: review?(roc)
Assignee | ||
Comment 3•16 years ago
|
||
Attachment #332585 -
Flags: review?(roc) → review+
Comment 4•16 years ago
|
||
Comment on attachment 331915 [details] [diff] [review]
the fix
>+ case eMetric_MacGraphiteTheme:
>+ aMetric = [NSColor currentControlTint] == NSGraphiteControlTint ? 1 : 0;
>+ break;
This seems a little hacky; at least comment explaining why there isn't a better way, perhaps? It might be good to have somebody with a mac background review this bit.
Also, the " ? 1 : 0" is unneeded. Booleans convert to integers exactly the way you want.
sr=dbaron
Attachment #331915 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 5•16 years ago
|
||
(In reply to comment #4)
> This seems a little hacky; at least comment explaining why there isn't a better
> way, perhaps?
Why does it seem hacky?
According to http://developer.apple.com/documentation/Cocoa/Conceptual/DrawColor/Tasks/SystemTintAware.html it's the preferred way to do it:
> You can get the current system-wide control tint using the NSColor class
> method currentControlTint. This method returns an NSControlTint that
> represents the currently selected appearance color. Currently
> NSBlueControlTint or NSGraphiteControlTint are the possible return values
> representing the Aqua and Graphite appearances respectively.
> Also, the " ? 1 : 0" is unneeded. Booleans convert to integers exactly the
> way you want.
Uh, yeah.
Comment 6•16 years ago
|
||
(In reply to comment #5)
> According to
> http://developer.apple.com/documentation/Cocoa/Conceptual/DrawColor/Tasks/SystemTintAware.html
> it's the preferred way to do it:
ok.
Comment 7•16 years ago
|
||
Can we also add a special color to for the tint? -moz-mac-tint? We do this for several windows-only colors currently.
Assignee | ||
Comment 8•16 years ago
|
||
I think there is already a color for that: -moz-mac-focusring
Or did you have something different in mind?
Comment 9•16 years ago
|
||
I didn't know if that was the same color as the tint. I don't use OSX very often :)
Comment on attachment 331915 [details] [diff] [review]
the fix
Gah, I hate that we're propagating these CSS selectors for themes, but I don't know of a better way to do this :(
Attachment #331915 -
Flags: review?(vladimir) → review+
Attachment #332585 -
Flags: superreview+
Assignee | ||
Comment 11•16 years ago
|
||
Attachment #331915 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 12•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/86c65d62602d
http://hg.mozilla.org/mozilla-central/rev/c4147dd93eb9
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Comment 13•16 years ago
|
||
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 ID:20081201061100
Any focusable widget has a nice graphite tint now, except the location and search bar. But this is covered by bug 422203.
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 15•16 years ago
|
||
(In reply to comment #13)
> Any focusable widget has a nice graphite tint now
This is not really what this bug is about. Currently the default theme doesn't use -moz-system-metric(mac-graphite-theme), so you can't really verify it without looking at the testcase (attachment 332586 [details]).
Another way to verify it is to install the latest GrApple theme from takebacktheweb.org and look at the location bar focus ring color.
Comment 16•16 years ago
|
||
Yes, the background color of attachment 332586 [details] is changing when switching between these two modes. I've also installed the GrApple theme and everything works fine. The focus tint of the location bar changes to graphite. So this time it's really verified. Thanks for the hint, Markus.
Comment 17•16 years ago
|
||
(In reply to comment #13)
> Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
> rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 ID:20081201061100
>
> Any focusable widget has a nice graphite tint now, except the location and
> search bar. But this is covered by bug 422203.
What about the Find bar that appears when you press Command + F? Shouldn't that now change accordingly? It doesn't.
Comment 18•16 years ago
|
||
(In reply to comment #17)
> What about the Find bar that appears when you press Command + F? Shouldn't that
> now change accordingly? It doesn't.
Good catch. I've added this to bug 422203.
Comment 19•16 years ago
|
||
I'll remove the in-litmus flag for now. We should wait until the default theme will support -moz-system-metric completely.
Flags: in-litmus?
You need to log in
before you can comment on or make changes to this bug.
Description
•