Closed Bug 1251019 Opened 9 years ago Closed 9 years ago

-moz-mac-chrome-active and -inactive are too dark on OS X 10.10

Categories

(Core :: Widget: Cocoa, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: aleth, Assigned: aleth)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files, 1 obsolete file)

On OS X 10.11, the colour values for -moz-mac-chrome-active and -inactive appear to be slightly too dark (assuming they are intended to match the toolbar colour, i.e. the titlebar colour, of active/inactive windows).
Blocks: el-capitan
Could this be related to bug 1088763 not having landed?
Flags: needinfo?(mconley)
Attached image Example screenshot (deleted) —
In this example, the "Conversations on hold" background is set to -moz-mac-chrome-active/inactive.
Fixing this system color requires changes in nsNativeThemeColors.h [1], which the patches in bug 1088763 don't touch, so it will need a separate patch. Aleth, are you interested in working on this? [1] https://dxr.mozilla.org/mozilla-central/source/widget/cocoa/nsNativeThemeColors.h
Flags: needinfo?(mconley)
(In reply to Markus Stange [:mstange] from comment #3) > Fixing this system color requires changes in nsNativeThemeColors.h [1], > which the patches in bug 1088763 don't touch, so it will need a separate > patch. Aleth, are you interested in working on this? It seems clear how to expand the code in nsNativeThemeColors.h, but I'm surprised the color values are hard coded. Is there a canonical source for them? Or do you grab them off a screenshot of some reference app? I'm also not sure whether the last relevant colour change was for 10.11 or if 10.10 already had these (bug 1088763 refers to 10.10).
I wish there were a canonical source. The colors are hardcoded because I couldn't find one. The last relevant color change was in 10.10. 10.11 uses the same colors as 10.10, as far as I can tell. I don't think the discussion in bug 1088763 even touched on updating -moz-mac-chrome-active and -inactive.
Summary: -moz-mac-chrome-active and -inactive are too dark on OS X 10.11 → -moz-mac-chrome-active and -inactive are too dark on OS X 10.10
Assignee: nobody → aleth
There's actually a subtle horizontal gradient both on the filled area and the borders, and the colours are not quite grey (the green value is reduced), so whatever values we pick here will be approximate.
This was the case with the original colors, too. We picked the bottom end color, so that toolbars with -moz-mac-chrome-active/-inactive can seamlessly connect to unified titlebar/toolbars.
Oh, wait, horizontal? That's surprising.
Attachment #8723782 - Flags: review?(mstange)
(In reply to Markus Stange [:mstange] from comment #8) > Oh, wait, horizontal? That's surprising. I was mistaken - the horizontal gradient was due to the background behind the window as OS X uses some degree of vibrancy there. The only built-in gradient is vertical. For the values in this patch, I used values based on screenshots of Safari taken with Grab (which avoids the vibrancy issue). The code which adds +1/-1 to the colour values for active windows is likely overkill, but I had added it already before I noticed that the same pattern didn't hold for inactive window colours.
(In reply to aleth [:aleth] from comment #10) > The only built-in gradient is vertical. (and this, too, only for active windows.)
Hmm. Can you pick the colors from the Firefox bookmarks library window instead? The toolbar there uses -moz-appearance:toolbar and it's not vibrant. Looking at the values there using Digital Color Meter (in /Applications/Utilities/), they seem to have r=g=b.
Attached image Safari active.tiff (deleted) —
Attached image Safari inactive.tiff (deleted) —
(In reply to Markus Stange [:mstange] from comment #12) > Hmm. Can you pick the colors from the Firefox bookmarks library window > instead? The toolbar there uses -moz-appearance:toolbar and it's not > vibrant. Looking at the values there using Digital Color Meter (in > /Applications/Utilities/), they seem to have r=g=b. Interesting, I wonder what the difference is in the system routine being called. Either way, it's better to do without the overly complicated +-1 adjustments, since we can't matching the active window colour precisely anyway due to the vertical gradient.
Colours taken from the bookmarks window where possible.
Attachment #8723993 - Flags: review?(mstange)
Attachment #8723782 - Attachment is obsolete: true
Attachment #8723782 - Flags: review?(mstange)
Comment on attachment 8723993 [details] [diff] [review] Add -moz-mac-chrome-active and -inactive colours for OS X 10.10 and higher Review of attachment 8723993 [details] [diff] [review]: ----------------------------------------------------------------- Great, thank you!
Attachment #8723993 - Flags: review?(mstange) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc210e2babbe095577acd60b90be407955396972 Bug 1251019 - Add -moz-mac-chrome-active and -inactive colours for OS X 10.10 and higher. r=mstange
Component: CSS Parsing and Computation → Widget: Cocoa
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Blocks: 1251724
Blocks: 1251762
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: