mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1743600 - Use selectedControlTextColor for native buttons on macOS. r=mac-reviewers,spohl
This is drive-by, but looks like the appropriate system colors rather than hardcoding to white. I've tested this in monterrey but should do the right thing in older macOS versions too. Depends on D132477 Differential Revision: https://phabricator.services.mozilla.com/D132478
This commit is contained in:
parent
2abc89c41e
commit
0dfd12b34e
@ -177,11 +177,7 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aScheme, nscolor
|
||||
color = NS_RGB(0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
case ColorID::MozButtonactivetext:
|
||||
// Pre-macOS 12, pressed buttons were filled with the highlight color and the text was white.
|
||||
// Starting with macOS 12, pressed (non-default) buttons are filled with medium gray and the
|
||||
// text color is the same as in the non-pressed state.
|
||||
color = nsCocoaFeatures::OnMontereyOrLater() ? GetColorFromNSColor(NSColor.controlTextColor)
|
||||
: NS_RGB(0xFF, 0xFF, 0xFF);
|
||||
color = GetColorFromNSColor(NSColor.selectedControlTextColor);
|
||||
break;
|
||||
case ColorID::Captiontext:
|
||||
case ColorID::Menutext:
|
||||
|
Loading…
Reference in New Issue
Block a user