selection highlight color changed in 0.5+ to no longer use system selection color. b=240320 r=josh sr=roc
git-svn-id: svn://10.0.0.236/trunk@199742 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -138,10 +138,12 @@ CSS_KEY(-moz-mac-accentlightesthighlight, _moz_mac_accentlightesthighlight)
|
||||
CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow)
|
||||
CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight)
|
||||
CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow)
|
||||
CSS_KEY(-moz-mac-alternateprimaryhighlight, _moz_mac_alternateprimaryhighlight)
|
||||
CSS_KEY(-moz-mac-focusring, _moz_mac_focusring)
|
||||
CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect)
|
||||
CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow)
|
||||
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
|
||||
CSS_KEY(-moz-mac-secondaryhighlight, _moz_mac_secondaryhighlight)
|
||||
CSS_KEY(-moz-malayalam, _moz_malayalam)
|
||||
CSS_KEY(-moz-marker, _moz_marker) // Disabled because not supported correctly.
|
||||
CSS_KEY(-moz-menuhover, _moz_menuhover)
|
||||
|
||||
@@ -442,6 +442,8 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
||||
eCSSKeyword__moz_mac_accentregularshadow, nsILookAndFeel::eColor__moz_mac_accentregularshadow,
|
||||
eCSSKeyword__moz_mac_accentdarkshadow, nsILookAndFeel::eColor__moz_mac_accentdarkshadow,
|
||||
eCSSKeyword__moz_mac_accentdarkestshadow, nsILookAndFeel::eColor__moz_mac_accentdarkestshadow,
|
||||
eCSSKeyword__moz_mac_alternateprimaryhighlight, nsILookAndFeel::eColor__moz_mac_alternateprimaryhighlight,
|
||||
eCSSKeyword__moz_mac_secondaryhighlight, nsILookAndFeel::eColor__moz_mac_secondaryhighlight,
|
||||
eCSSKeyword__moz_menuhover, nsILookAndFeel::eColor__moz_menuhover,
|
||||
eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext,
|
||||
eCSSKeyword__moz_menubarhovertext, nsILookAndFeel::eColor__moz_menubarhovertext,
|
||||
|
||||
@@ -149,6 +149,10 @@ public:
|
||||
eColor__moz_mac_accentregularshadow,
|
||||
eColor__moz_mac_accentdarkshadow,
|
||||
eColor__moz_mac_accentdarkestshadow,
|
||||
|
||||
//new in 10.2
|
||||
eColor__moz_mac_alternateprimaryhighlight, //active list highlight
|
||||
eColor__moz_mac_secondaryhighlight, //inactive light hightlight
|
||||
|
||||
// keep this one last, please
|
||||
eColor_LAST_COLOR
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
#include <ControlDefinitions.h>
|
||||
#include <MacWindows.h>
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
|
||||
// This theme brush is available in 10.2 and later, but was not
|
||||
// formally documented in the SDK until 10.3.
|
||||
#define kThemeBrushAlternatePrimaryHighlightColor -5
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
@@ -354,6 +359,17 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
||||
case eColor__moz_buttondefault:
|
||||
res = GetMacBrushColor(kThemeBrushButtonActiveDarkShadow, aColor, NS_RGB(0x77,0x77,0x77));
|
||||
break;
|
||||
case eColor__moz_mac_alternateprimaryhighlight:
|
||||
// For proper styling of lists when active, on 10.2+
|
||||
// On older OSs may have to fall back to primary highlight color
|
||||
nscolor fallbackColor;
|
||||
GetMacBrushColor(kThemeBrushPrimaryHighlightColor, fallbackColor, NS_RGB(0x00,0x00,0x00));
|
||||
res = GetMacBrushColor(kThemeBrushAlternatePrimaryHighlightColor, aColor, fallbackColor);
|
||||
break;
|
||||
case eColor__moz_mac_secondaryhighlight:
|
||||
// For inactive list selection
|
||||
res = GetMacBrushColor(kThemeBrushSecondaryHighlightColor, aColor, NS_RGB(0x00,0x00,0x00));
|
||||
break;
|
||||
default:
|
||||
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
|
||||
aColor = NS_RGB(0xff,0xff,0xff);
|
||||
|
||||
Reference in New Issue
Block a user