зеркало из https://github.com/mozilla/pjs.git
Fix 65025: scrollbars in Mac Classic are wrong color. patch by lordpixel. r=blake sr=blizzard
This commit is contained in:
Родитель
41dee6a5f5
Коммит
35c3ef934e
|
@ -57,6 +57,13 @@ 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-accentlightesthighlight, _moz_mac_accentlightesthighlight)
|
||||
CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight)
|
||||
CSS_KEY(-moz-mac-accentface, _moz_mac_accentface)
|
||||
CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow)
|
||||
CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow)
|
||||
CSS_KEY(-moz-right, _moz_right)
|
||||
CSS_KEY(-moz-pre-wrap, _moz_pre_wrap)
|
||||
CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none)
|
||||
|
|
|
@ -57,6 +57,13 @@ 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-accentlightesthighlight, _moz_mac_accentlightesthighlight)
|
||||
CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight)
|
||||
CSS_KEY(-moz-mac-accentface, _moz_mac_accentface)
|
||||
CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow)
|
||||
CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow)
|
||||
CSS_KEY(-moz-right, _moz_right)
|
||||
CSS_KEY(-moz-pre-wrap, _moz_pre_wrap)
|
||||
CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none)
|
||||
|
|
|
@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
|||
eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect,
|
||||
eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow,
|
||||
eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect,
|
||||
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,
|
||||
eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow,
|
||||
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,
|
||||
-1,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -57,6 +57,13 @@ 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-accentlightesthighlight, _moz_mac_accentlightesthighlight)
|
||||
CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight)
|
||||
CSS_KEY(-moz-mac-accentface, _moz_mac_accentface)
|
||||
CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow)
|
||||
CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow)
|
||||
CSS_KEY(-moz-right, _moz_right)
|
||||
CSS_KEY(-moz-pre-wrap, _moz_pre_wrap)
|
||||
CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none)
|
||||
|
|
|
@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
|||
eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect,
|
||||
eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow,
|
||||
eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect,
|
||||
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,
|
||||
eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow,
|
||||
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,
|
||||
-1,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -57,6 +57,13 @@ 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-accentlightesthighlight, _moz_mac_accentlightesthighlight)
|
||||
CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight)
|
||||
CSS_KEY(-moz-mac-accentface, _moz_mac_accentface)
|
||||
CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow)
|
||||
CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow)
|
||||
CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow)
|
||||
CSS_KEY(-moz-right, _moz_right)
|
||||
CSS_KEY(-moz-pre-wrap, _moz_pre_wrap)
|
||||
CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none)
|
||||
|
|
|
@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
|||
eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect,
|
||||
eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow,
|
||||
eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect,
|
||||
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,
|
||||
eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow,
|
||||
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,
|
||||
-1,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -41,28 +41,28 @@ thumb {
|
|||
-moz-binding: url("chrome://global/skin/classicBindings.xml#thumb");
|
||||
-moz-user-focus: ignore;
|
||||
-moz-user-select: none;
|
||||
background-color: #9999FF;
|
||||
background-color: -moz-mac-accentface;
|
||||
border-left: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
list-style-image: url("chrome://global/skin/scroll-thumb-horiz.gif");
|
||||
}
|
||||
|
||||
.thumb-border {
|
||||
border-right: 1px solid rgb(40%,40%,80%); /* #6666CC */
|
||||
border-bottom: 1px solid rgb(40%,40%,80%); /* #6666CC */
|
||||
border-top: 1px solid rgb(80%,80%,100%); /* #CCCCFF */
|
||||
border-left: 1px solid rgb(80%,80%,100%); /* #CCCCFF */
|
||||
border-right: 1px solid -moz-mac-accentlightshadow;
|
||||
border-bottom: 1px solid -moz-mac-accentlightshadow;
|
||||
border-top: 1px solid -moz-mac-accentregularhighlight;
|
||||
border-left: 1px solid -moz-mac-accentregularhighlight;
|
||||
}
|
||||
|
||||
thumb:active > .thumb-border {
|
||||
border-right: 1px solid #333399;
|
||||
border-bottom: 1px solid #333399;
|
||||
border-top: 1px solid #9999FF;
|
||||
border-left: 1px solid #9999FF;
|
||||
border-right: 1px solid -moz-mac-accentregularshadow;
|
||||
border-bottom: 1px solid -moz-mac-accentregularshadow;
|
||||
border-top: 1px solid -moz-mac-accentface;
|
||||
border-left: 1px solid -moz-mac-accentface;
|
||||
}
|
||||
|
||||
thumb:active {
|
||||
background-color: #6666CC;
|
||||
background-color: -moz-mac-accentlightshadow;
|
||||
list-style-image: url("chrome://global/skin/scroll-thumb-horiz-active.gif");
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ thumb[align="vertical"] {
|
|||
}
|
||||
|
||||
thumb[align="vertical"]:active {
|
||||
background-color: #6666CC;
|
||||
background-color: -moz-mac-accentlightshadow;
|
||||
list-style-image: url("chrome://global/skin/scroll-thumb-vert-active.gif");
|
||||
}
|
||||
|
||||
|
|
|
@ -92,8 +92,18 @@ public:
|
|||
eColor__moz_mac_focusring, //ring around text fields and lists
|
||||
eColor__moz_mac_menuselect, //colour used when mouse is over a menu item
|
||||
eColor__moz_mac_menushadow, //colour used to do shadows on menu items
|
||||
eColor__moz_mac_menutextselect //colour used to display text while mouse is over a menu item
|
||||
eColor__moz_mac_menutextselect, //colour used to display text while mouse is over a menu item
|
||||
|
||||
//all of the accert colours
|
||||
eColor__moz_mac_accentlightesthighlight,
|
||||
eColor__moz_mac_accentregularhighlight,
|
||||
eColor__moz_mac_accentface,
|
||||
eColor__moz_mac_accentlightshadow,
|
||||
eColor__moz_mac_accentregularshadow,
|
||||
eColor__moz_mac_accentdarkshadow,
|
||||
eColor__moz_mac_accentdarkestshadow
|
||||
|
||||
|
||||
} nsColorID;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -240,10 +240,6 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
|||
//default to lavender if not available
|
||||
res = GetMacBrushColor(kThemeBrushFocusHighlight, aColor, NS_RGB(0x63,0x63,0xCE));
|
||||
break;
|
||||
case eColor__moz_mac_menuselect:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentregularshadow, aColor, NS_RGB(0x63,0x63,0xCE));
|
||||
break;
|
||||
case eColor__moz_mac_menushadow:
|
||||
res = GetMacBrushColor(kThemeBrushBevelActiveDark, aColor, NS_RGB(0x88,0x88,0x88));
|
||||
break;
|
||||
|
@ -251,6 +247,35 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
|||
//default to white, which is what Platinum uses, if not available
|
||||
res = GetMacTextColor(kThemeTextColorMenuItemSelected, aColor, NS_RGB(0xFF,0xFF,0xFF));
|
||||
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));
|
||||
break;
|
||||
case eColor__moz_mac_accentregularhighlight:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentregularhighlight, aColor, NS_RGB(0xCC,0xCC,0xFF));
|
||||
break;
|
||||
case eColor__moz_mac_accentface:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentface, aColor, NS_RGB(0x99,0x99,0xFF));
|
||||
break;
|
||||
case eColor__moz_mac_accentlightshadow:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentlightshadow, aColor, NS_RGB(0x66,0x66,0xCC));
|
||||
break;
|
||||
case eColor__moz_mac_menuselect:
|
||||
case eColor__moz_mac_accentregularshadow:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentregularshadow, aColor, NS_RGB(0x63,0x63,0xCE));
|
||||
break;
|
||||
case eColor__moz_mac_accentdarkshadow:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentdarkshadow, aColor, NS_RGB(0x00,0x00,0x88));
|
||||
break;
|
||||
case eColor__moz_mac_accentdarkestshadow:
|
||||
//get this colour by querying variation table, ows. default to Platinum/Lavendar
|
||||
res = GetMacAccentColor(eColorOffset_mac_accentdarkestshadow, aColor, NS_RGB(0x00,0x00,0x55));
|
||||
break;
|
||||
default:
|
||||
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
|
||||
aColor = NS_RGB(0xff,0xff,0xff);
|
||||
|
|
|
@ -175,11 +175,26 @@ nsLookAndFeelColorPref nsXPLookAndFeel::sColorPrefs[] =
|
|||
{ "ui.-moz-mac-focusring",
|
||||
eColor__moz_mac_focusring, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-menuselect",
|
||||
eColor__moz_mac_menuselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-menushadow",
|
||||
eColor__moz_mac_menushadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-menutextshadow",
|
||||
eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-menutextselect",
|
||||
eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentlightesthighlight",
|
||||
eColor__moz_mac_accentlightesthighlight, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentregularhighlight",
|
||||
eColor__moz_mac_accentregularhighlight, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentface",
|
||||
eColor__moz_mac_accentface, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentlightshadow",
|
||||
eColor__moz_mac_accentlightshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentregularshadow",
|
||||
eColor__moz_mac_accentregularshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentdarkshadow",
|
||||
eColor__moz_mac_accentdarkshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
{ "ui.-moz-mac-accentdarkestshadow",
|
||||
eColor__moz_mac_accentdarkestshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 },
|
||||
|
||||
};
|
||||
|
||||
PRBool nsXPLookAndFeel::sInitialized = PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче