mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 531078 - Use MacOS system color for selected text background in inactive windows. r=mstange.
This commit is contained in:
parent
0a1aa00f54
commit
4d7b2dacaf
@ -102,6 +102,11 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor)
|
||||
case eColorID_TextSelectBackground:
|
||||
aColor = GetColorFromNSColor([NSColor selectedTextBackgroundColor]);
|
||||
break;
|
||||
// This is used to gray out the selection when it's not focused. Used with
|
||||
// nsISelectionController::SELECTION_DISABLED.
|
||||
case eColorID_TextSelectBackgroundDisabled:
|
||||
aColor = GetColorFromNSColor([NSColor secondarySelectedControlColor]);
|
||||
break;
|
||||
case eColorID_highlight: // CSS2 color
|
||||
aColor = GetColorFromNSColor([NSColor alternateSelectedControlColor]);
|
||||
break;
|
||||
|
@ -769,12 +769,14 @@ nsXPLookAndFeel::GetColorImpl(ColorID aID, bool aUseStandinsForNativeColors,
|
||||
}
|
||||
|
||||
// There are no system color settings for these, so set them manually
|
||||
#ifndef XP_MACOSX
|
||||
if (aID == eColorID_TextSelectBackgroundDisabled) {
|
||||
// This is used to gray out the selection when it's not focused
|
||||
// Used with nsISelectionController::SELECTION_DISABLED
|
||||
aResult = NS_RGB(0xb0, 0xb0, 0xb0);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aID == eColorID_TextSelectBackgroundAttention) {
|
||||
if (sFindbarModalHighlight) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user