From 9a6be32faff24b4517ccccb25eb8527da2da613b Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 9 Dec 2008 17:48:51 +0100 Subject: [PATCH] Bug 468498 - Add color -moz-mac-disabledtoolbartext for disabled text in toolbars. r=roc --- layout/style/nsCSSKeywordList.h | 1 + layout/style/nsCSSProps.cpp | 1 + widget/public/nsILookAndFeel.h | 1 + widget/src/cocoa/nsLookAndFeel.mm | 3 +++ 4 files changed, 6 insertions(+) diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index dedcd8dde800..5fbc2691cbb8 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -146,6 +146,7 @@ CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect) CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextdisable, _moz_mac_menutextdisable) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) +CSS_KEY(-moz-mac-disabledtoolbartext, _moz_mac_disabledtoolbartext) 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. diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index b41e4fae0231..277c1b5b71b6 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -477,6 +477,7 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, eCSSKeyword__moz_mac_menutextdisable, nsILookAndFeel::eColor__moz_mac_menutextdisable, eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect, + eCSSKeyword__moz_mac_disabledtoolbartext, nsILookAndFeel::eColor__moz_mac_disabledtoolbartext, eCSSKeyword__moz_mac_accentlightesthighlight, nsILookAndFeel::eColor__moz_mac_accentlightesthighlight, eCSSKeyword__moz_mac_accentregularhighlight, nsILookAndFeel::eColor__moz_mac_accentregularhighlight, eCSSKeyword__moz_mac_accentface, nsILookAndFeel::eColor__moz_mac_accentface, diff --git a/widget/public/nsILookAndFeel.h b/widget/public/nsILookAndFeel.h index 7af2c8e8e4fb..b305fab0c183 100644 --- a/widget/public/nsILookAndFeel.h +++ b/widget/public/nsILookAndFeel.h @@ -151,6 +151,7 @@ public: eColor__moz_mac_menushadow, //colour used to do shadows on menu items eColor__moz_mac_menutextdisable, // color used to display text for disabled menu items eColor__moz_mac_menutextselect, //colour used to display text while mouse is over a menu item + eColor__moz_mac_disabledtoolbartext, // text color of disabled text on toolbars //all of the accent colours eColor__moz_mac_accentlightesthighlight, diff --git a/widget/src/cocoa/nsLookAndFeel.mm b/widget/src/cocoa/nsLookAndFeel.mm index f6bfbece46e0..9fc593844056 100644 --- a/widget/src/cocoa/nsLookAndFeel.mm +++ b/widget/src/cocoa/nsLookAndFeel.mm @@ -314,6 +314,9 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) case eColor__moz_mac_menutextselect: res = GetMacTextColor(kThemeTextColorMenuItemSelected, aColor, NS_RGB(0xFF,0xFF,0xFF)); break; + case eColor__moz_mac_disabledtoolbartext: + aColor = NS_RGB(0x3F,0x3F,0x3F); + break; case eColor__moz_mac_accentlightesthighlight: //get this colour by querying variation table, ows. default to Platinum/Lavendar res = GetMacAccentColor(eColorOffset_mac_accentlightesthighlight, aColor, NS_RGB(0xEE,0xEE,0xEE));