зеркало из https://github.com/mozilla/gecko-dev.git
bug 251492 [gnome]selected item text wrong color in high-contrast themes
ginn.chen%sun.com r=bryner sr=dbaron also fix bug 244955 [GNOME] incorrect system colors for the menu item text
This commit is contained in:
Родитель
9c43217e31
Коммит
07450eb9c0
|
@ -78,7 +78,11 @@ CSS_KEY(-moz-box, _moz_box)
|
|||
CSS_KEY(-moz-bulletinboard, _moz_bulletinboard)
|
||||
CSS_KEY(-moz-button, _moz_button)
|
||||
CSS_KEY(-moz-buttondefault, _moz_buttondefault)
|
||||
CSS_KEY(-moz-buttonhoverface, _moz_buttonhoverface)
|
||||
CSS_KEY(-moz-buttonhovertext, _moz_buttonhovertext)
|
||||
CSS_KEY(-moz-cell, _moz_cell)
|
||||
CSS_KEY(-moz-cellhighlight, _moz_cellhighlight)
|
||||
CSS_KEY(-moz-cellhighlighttext, _moz_cellhighlighttext)
|
||||
CSS_KEY(-moz-center, _moz_center)
|
||||
CSS_KEY(-moz-cjk-earthly-branch, _moz_cjk_earthly_branch)
|
||||
CSS_KEY(-moz-cjk-heavenly-stem, _moz_cjk_heavenly_stem)
|
||||
|
@ -105,7 +109,6 @@ CSS_KEY(-moz-grid-group, _moz_grid_group)
|
|||
CSS_KEY(-moz-grid-line, _moz_grid_line)
|
||||
CSS_KEY(-moz-grid, _moz_grid)
|
||||
CSS_KEY(-moz-groupbox, _moz_groupbox)
|
||||
CSS_KEY(-moz-gtk2-hovertext, _moz_gtk2_hovertext)
|
||||
CSS_KEY(-moz-gujarati, _moz_gujarati)
|
||||
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
|
||||
CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant)
|
||||
|
@ -138,6 +141,8 @@ CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow)
|
|||
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
|
||||
CSS_KEY(-moz-malayalam, _moz_malayalam)
|
||||
CSS_KEY(-moz-marker, _moz_marker) // Disabled because not supported correctly.
|
||||
CSS_KEY(-moz-menuhover, _moz_menuhover)
|
||||
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
||||
CSS_KEY(-moz-myanmar, _moz_myanmar)
|
||||
CSS_KEY(-moz-oriya, _moz_oriya)
|
||||
CSS_KEY(-moz-page-break, _moz_page_break)
|
||||
|
|
|
@ -403,13 +403,16 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
|||
eCSSKeyword_windowtext, nsILookAndFeel::eColor_windowtext,
|
||||
eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT,
|
||||
eCSSKeyword__moz_buttondefault, nsILookAndFeel::eColor__moz_buttondefault,
|
||||
eCSSKeyword__moz_buttonhoverface, nsILookAndFeel::eColor__moz_buttonhoverface,
|
||||
eCSSKeyword__moz_buttonhovertext, nsILookAndFeel::eColor__moz_buttonhovertext,
|
||||
eCSSKeyword__moz_cellhighlight, nsILookAndFeel::eColor__moz_cellhighlight,
|
||||
eCSSKeyword__moz_cellhighlighttext, nsILookAndFeel::eColor__moz_cellhighlighttext,
|
||||
eCSSKeyword__moz_field, nsILookAndFeel::eColor__moz_field,
|
||||
eCSSKeyword__moz_fieldtext, nsILookAndFeel::eColor__moz_fieldtext,
|
||||
eCSSKeyword__moz_dialog, nsILookAndFeel::eColor__moz_dialog,
|
||||
eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext,
|
||||
eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone,
|
||||
eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT,
|
||||
eCSSKeyword__moz_gtk2_hovertext, nsILookAndFeel::eColor__moz_gtk2_hovertext,
|
||||
eCSSKeyword__moz_mac_focusring, nsILookAndFeel::eColor__moz_mac_focusring,
|
||||
eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect,
|
||||
eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow,
|
||||
|
@ -421,6 +424,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_menuhover, nsILookAndFeel::eColor__moz_menuhover,
|
||||
eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext,
|
||||
eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
|
|
@ -78,7 +78,11 @@ CSS_KEY(-moz-box, _moz_box)
|
|||
CSS_KEY(-moz-bulletinboard, _moz_bulletinboard)
|
||||
CSS_KEY(-moz-button, _moz_button)
|
||||
CSS_KEY(-moz-buttondefault, _moz_buttondefault)
|
||||
CSS_KEY(-moz-buttonhoverface, _moz_buttonhoverface)
|
||||
CSS_KEY(-moz-buttonhovertext, _moz_buttonhovertext)
|
||||
CSS_KEY(-moz-cell, _moz_cell)
|
||||
CSS_KEY(-moz-cellhighlight, _moz_cellhighlight)
|
||||
CSS_KEY(-moz-cellhighlighttext, _moz_cellhighlighttext)
|
||||
CSS_KEY(-moz-center, _moz_center)
|
||||
CSS_KEY(-moz-cjk-earthly-branch, _moz_cjk_earthly_branch)
|
||||
CSS_KEY(-moz-cjk-heavenly-stem, _moz_cjk_heavenly_stem)
|
||||
|
@ -105,7 +109,6 @@ CSS_KEY(-moz-grid-group, _moz_grid_group)
|
|||
CSS_KEY(-moz-grid-line, _moz_grid_line)
|
||||
CSS_KEY(-moz-grid, _moz_grid)
|
||||
CSS_KEY(-moz-groupbox, _moz_groupbox)
|
||||
CSS_KEY(-moz-gtk2-hovertext, _moz_gtk2_hovertext)
|
||||
CSS_KEY(-moz-gujarati, _moz_gujarati)
|
||||
CSS_KEY(-moz-gurmukhi, _moz_gurmukhi)
|
||||
CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant)
|
||||
|
@ -138,6 +141,8 @@ CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow)
|
|||
CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect)
|
||||
CSS_KEY(-moz-malayalam, _moz_malayalam)
|
||||
CSS_KEY(-moz-marker, _moz_marker) // Disabled because not supported correctly.
|
||||
CSS_KEY(-moz-menuhover, _moz_menuhover)
|
||||
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
||||
CSS_KEY(-moz-myanmar, _moz_myanmar)
|
||||
CSS_KEY(-moz-oriya, _moz_oriya)
|
||||
CSS_KEY(-moz-page-break, _moz_page_break)
|
||||
|
|
|
@ -403,13 +403,16 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
|||
eCSSKeyword_windowtext, nsILookAndFeel::eColor_windowtext,
|
||||
eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT,
|
||||
eCSSKeyword__moz_buttondefault, nsILookAndFeel::eColor__moz_buttondefault,
|
||||
eCSSKeyword__moz_buttonhoverface, nsILookAndFeel::eColor__moz_buttonhoverface,
|
||||
eCSSKeyword__moz_buttonhovertext, nsILookAndFeel::eColor__moz_buttonhovertext,
|
||||
eCSSKeyword__moz_cellhighlight, nsILookAndFeel::eColor__moz_cellhighlight,
|
||||
eCSSKeyword__moz_cellhighlighttext, nsILookAndFeel::eColor__moz_cellhighlighttext,
|
||||
eCSSKeyword__moz_field, nsILookAndFeel::eColor__moz_field,
|
||||
eCSSKeyword__moz_fieldtext, nsILookAndFeel::eColor__moz_fieldtext,
|
||||
eCSSKeyword__moz_dialog, nsILookAndFeel::eColor__moz_dialog,
|
||||
eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext,
|
||||
eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone,
|
||||
eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT,
|
||||
eCSSKeyword__moz_gtk2_hovertext, nsILookAndFeel::eColor__moz_gtk2_hovertext,
|
||||
eCSSKeyword__moz_mac_focusring, nsILookAndFeel::eColor__moz_mac_focusring,
|
||||
eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect,
|
||||
eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow,
|
||||
|
@ -421,6 +424,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_menuhover, nsILookAndFeel::eColor__moz_menuhover,
|
||||
eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext,
|
||||
eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
|
|
@ -85,13 +85,12 @@ button[default="true"] {
|
|||
-moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
/* .......... hover state .......... */
|
||||
|
||||
button:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
background-color: -moz-buttonhoverface;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* .......... active/open/checked state .......... */
|
||||
|
||||
|
@ -102,9 +101,7 @@ button[checked="true"] {
|
|||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent;
|
||||
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
color: ButtonText;
|
||||
#endif
|
||||
}
|
||||
|
||||
button:hover:active > .button-box,
|
||||
|
|
|
@ -113,7 +113,7 @@ checkbox[disabled="true"] {
|
|||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
checkbox:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ radio[disabled="true"] {
|
|||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
radio:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,9 +75,8 @@ toolbarbutton[buttonover="true"] {
|
|||
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
-moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
color: -moz-gtk2-hovertext;
|
||||
#endif
|
||||
color: -moz-buttonhovertext;
|
||||
background-color: -moz-buttonhoverface;
|
||||
}
|
||||
|
||||
toolbarbutton:hover:active,
|
||||
|
@ -87,9 +86,7 @@ toolbarbutton[open="true"] {
|
|||
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDHighlight;
|
||||
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
|
||||
padding: 3px 1px 1px 3px;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
color: ButtonText;
|
||||
#endif
|
||||
}
|
||||
|
||||
toolbarbutton[disabled="true"],
|
||||
|
|
|
@ -72,8 +72,8 @@ listbox:focus > listitem[current="true"][selected="true"] {
|
|||
}
|
||||
|
||||
listitem[selected="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
background-color: -moz-cellhighlight;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
listbox:focus > listitem[selected="true"] {
|
||||
|
@ -169,4 +169,4 @@ listheader[sortable="true"]:hover:active {
|
|||
|
||||
.listcell-check[disabled="true"][checked="true"] {
|
||||
background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@ menuitem[default="true"] {
|
|||
#ifdef MOZ_WIDGET_GTK2
|
||||
menu[_moz-menuactive="true"],
|
||||
menuitem[_moz-menuactive="true"] {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-menuhovertext;
|
||||
background-color: -moz-menuhover;
|
||||
}
|
||||
|
||||
menubar > menu[_moz-menuactive="true"] {
|
||||
|
@ -71,7 +72,8 @@ menubar > menu[_moz-menuactive="true"] {
|
|||
}
|
||||
|
||||
menubar > menu[open] {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-menuhovertext;
|
||||
background-color: -moz-menuhover;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ treechildren::-moz-tree-row {
|
|||
}
|
||||
|
||||
treechildren::-moz-tree-row(selected) {
|
||||
background-color: -moz-Dialog;
|
||||
background-color: -moz-cellhighlight;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-row(selected, focus) {
|
||||
|
@ -109,7 +109,7 @@ treechildren::-moz-tree-cell-text {
|
|||
}
|
||||
|
||||
treechildren::-moz-tree-cell-text(selected) {
|
||||
color: -moz-DialogText;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary) {
|
||||
|
@ -118,8 +118,8 @@ tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary) {
|
|||
}
|
||||
|
||||
tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary, selected) {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
background-color: -moz-cellhighlight;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-cell-text(selected, focus) {
|
||||
|
@ -335,11 +335,11 @@ treechildren[alternatingbackground="true"]::-moz-tree-row(odd) {
|
|||
}
|
||||
|
||||
treechildren[alternatingbackground="true"]::-moz-tree-row(odd, selected) {
|
||||
background-color: -moz-Dialog;
|
||||
background-color: -moz-cellhighlight;
|
||||
}
|
||||
|
||||
treechildren[alternatingbackground="true"]::-moz-tree-cell-text(odd, selected) {
|
||||
color: -moz-DialogText;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
treechildren[alternatingbackground="true"]::-moz-tree-row(odd, selected, focus) {
|
||||
|
|
|
@ -229,8 +229,8 @@ classic.jar:
|
|||
skin/classic/global/autocomplete.css (global/unix/autocomplete.css)
|
||||
* skin/classic/global/checkbox.css (global/unix/checkbox.css)
|
||||
* skin/classic/global/radio.css (global/unix/radio.css)
|
||||
* skin/classic/global/button.css (global/unix/button.css)
|
||||
* skin/classic/global/toolbarbutton.css (global/unix/toolbarbutton.css)
|
||||
skin/classic/global/button.css (global/unix/button.css)
|
||||
skin/classic/global/toolbarbutton.css (global/unix/toolbarbutton.css)
|
||||
skin/classic/global/global.css (global/unix/global.css)
|
||||
#else
|
||||
skin/classic/global/autocomplete.css (global/win/autocomplete.css)
|
||||
|
|
|
@ -78,7 +78,8 @@ button[default="true"] {
|
|||
/* .......... hover state .......... */
|
||||
|
||||
button:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
background-color: -moz-buttonhoverface;
|
||||
}
|
||||
|
||||
/* .......... active/open/checked state .......... */
|
||||
|
|
|
@ -98,9 +98,8 @@ checkbox[disabled="true"] {
|
|||
}
|
||||
|
||||
checkbox:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
}
|
||||
|
||||
checkbox:hover:active > .checkbox-spacer-box > .checkbox-check {
|
||||
background-color: -moz-Dialog;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ menuitem[default="true"] {
|
|||
|
||||
menu[_moz-menuactive="true"],
|
||||
menuitem[_moz-menuactive="true"] {
|
||||
color: HighlightText;
|
||||
color: -moz-menuhovertext;
|
||||
background-color: -moz-menuhover;
|
||||
}
|
||||
|
||||
menu[disabled="true"],
|
||||
|
@ -63,7 +64,8 @@ menubar > menu[_moz-menuactive="true"] {
|
|||
}
|
||||
|
||||
menubar > menu[open] {
|
||||
color: HighlightText;
|
||||
color: -moz-menuhovertext;
|
||||
background-color: -moz-menuhover;
|
||||
}
|
||||
|
||||
/* ::::: menu/menuitems in menulist popups ::::: */
|
||||
|
|
|
@ -112,7 +112,7 @@ radio[disabled="true"] {
|
|||
}
|
||||
|
||||
radio:hover {
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
}
|
||||
|
||||
radio:hover:active > .radio-spacer-box > .radio-check-box1 {
|
||||
|
|
|
@ -52,7 +52,8 @@ toolbarbutton {
|
|||
toolbarbutton:hover,
|
||||
toolbarbutton[buttonover="true"] {
|
||||
border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;
|
||||
color: -moz-gtk2-hovertext;
|
||||
color: -moz-buttonhovertext;
|
||||
background-color: -moz-buttonhoverface;
|
||||
}
|
||||
|
||||
toolbarbutton:hover:active,
|
||||
|
|
|
@ -52,8 +52,8 @@ listbox:focus > listitem[selected="true"][current="true"] {
|
|||
}
|
||||
|
||||
listitem[selected="true"] {
|
||||
background-color: -moz-Dialog;
|
||||
color: -moz-DialogText;
|
||||
background-color: -moz-cellhighlight;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
listbox:focus > listitem[selected="true"] {
|
||||
|
@ -149,4 +149,4 @@ listheader[sortable="true"]:hover:active {
|
|||
|
||||
.listcell-check[disabled="true"][checked="true"] {
|
||||
background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ treechildren::-moz-tree-row {
|
|||
}
|
||||
|
||||
treechildren::-moz-tree-row(selected) {
|
||||
background-color: -moz-Dialog;
|
||||
background-color: -moz-cellhighlight;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-row(selected, focus) {
|
||||
|
@ -72,7 +72,7 @@ treechildren::-moz-tree-cell-text {
|
|||
}
|
||||
|
||||
treechildren::-moz-tree-cell-text(selected) {
|
||||
color: -moz-DialogText;
|
||||
color: -moz-cellhighlighttext;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-cell-text(selected, focus) {
|
||||
|
|
|
@ -113,15 +113,19 @@ public:
|
|||
eColor__moz_dialogtext,
|
||||
eColor__moz_dragtargetzone, //used to highlight valid regions to drop something onto
|
||||
|
||||
eColor__moz_cellhighlight, //used to cell text background, selected but not focus
|
||||
eColor__moz_cellhighlighttext, //used to cell text, selected but not focus
|
||||
eColor__moz_buttonhoverface, //used to button text background, when mouse is over
|
||||
eColor__moz_buttonhovertext, //used to button text, when mouse is over
|
||||
eColor__moz_menuhover, //used to menu item background, when mouse is over
|
||||
eColor__moz_menuhovertext, //used to menu item text, when mouse is over
|
||||
|
||||
//colours needed by Mac Classic skin
|
||||
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
|
||||
|
||||
//colour needed by GTK2 Classic skin
|
||||
eColor__moz_gtk2_hovertext,
|
||||
|
||||
//all of the accent colours
|
||||
eColor__moz_mac_accentlightesthighlight,
|
||||
eColor__moz_mac_accentregularhighlight,
|
||||
|
|
|
@ -138,6 +138,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
}
|
||||
break;
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
aColor = NS_RGB(0xdd, 0xdd, 0xdd);
|
||||
break;
|
||||
//should be lighter of 2 possible highlight colours available
|
||||
|
@ -149,6 +150,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x77, 0x77, 0x77);
|
||||
break;
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
case eColor_captiontext:
|
||||
|
@ -158,6 +160,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x77, 0x77, 0x77);
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
{
|
||||
// B_MENU_SELECTION_BACKGROUND_COLOR is used for text selection
|
||||
// this blue colors seems more suitable
|
||||
|
@ -166,6 +169,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
}
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
{
|
||||
color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR);
|
||||
aColor = NS_RGB(color.red, color.green, color.blue);
|
||||
|
@ -235,10 +239,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
//all bars including MenuBar
|
||||
aColor = NS_RGB(0xdd, 0xdd, 0xdd);
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
case eColor__moz_dragtargetzone:
|
||||
|
|
|
@ -145,10 +145,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
// or maybe mStyle->text?
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
// background of selected item
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
// text of selected item
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
|
@ -187,11 +189,13 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
|
||||
case eColor_threedface:
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
// 3-D face color
|
||||
aColor = sButtonBackground;
|
||||
break;
|
||||
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
// text on push buttons
|
||||
aColor = sButtonText;
|
||||
break;
|
||||
|
@ -239,9 +243,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]);
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]);
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]);
|
||||
break;
|
||||
case eColor__moz_dragtargetzone:
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
nscolor nsLookAndFeel::sInfoText = 0;
|
||||
nscolor nsLookAndFeel::sInfoBackground = 0;
|
||||
nscolor nsLookAndFeel::sMenuText = 0;
|
||||
nscolor nsLookAndFeel::sMenuHover = 0;
|
||||
nscolor nsLookAndFeel::sMenuHoverText = 0;
|
||||
nscolor nsLookAndFeel::sMenuBackground = 0;
|
||||
nscolor nsLookAndFeel::sButtonBackground = 0;
|
||||
nscolor nsLookAndFeel::sButtonText = 0;
|
||||
|
@ -150,11 +152,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
break;
|
||||
case eColor_highlight:
|
||||
// background of selected item
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]);
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
// text of selected item
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_SELECTED]);
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_SELECTED]);
|
||||
break;
|
||||
case eColor_inactiveborder:
|
||||
// inactive window border
|
||||
|
@ -255,9 +257,24 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
|||
// default button border color
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->black);
|
||||
break;
|
||||
case eColor__moz_gtk2_hovertext:
|
||||
case eColor__moz_buttonhoverface:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_PRELIGHT]);
|
||||
break;
|
||||
case eColor__moz_buttonhovertext:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_PRELIGHT]);
|
||||
break;
|
||||
case eColor__moz_cellhighlight:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_ACTIVE]);
|
||||
break;
|
||||
case eColor__moz_cellhighlighttext:
|
||||
aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_ACTIVE]);
|
||||
break;
|
||||
case eColor__moz_menuhover:
|
||||
aColor = sMenuHover;
|
||||
break;
|
||||
case eColor__moz_menuhovertext:
|
||||
aColor = sMenuHoverText;
|
||||
break;
|
||||
default:
|
||||
/* default color is BLACK */
|
||||
aColor = 0;
|
||||
|
@ -485,6 +502,10 @@ nsLookAndFeel::InitColors()
|
|||
|
||||
style = gtk_widget_get_style(menu);
|
||||
sMenuBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
|
||||
|
||||
style = gtk_widget_get_style(menuitem);
|
||||
sMenuHover = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_PRELIGHT]);
|
||||
sMenuHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_PRELIGHT]);
|
||||
|
||||
gtk_widget_unref(menu);
|
||||
|
||||
|
|
|
@ -64,6 +64,8 @@ protected:
|
|||
static nscolor sInfoText;
|
||||
static nscolor sMenuBackground;
|
||||
static nscolor sMenuText;
|
||||
static nscolor sMenuHover;
|
||||
static nscolor sMenuHoverText;
|
||||
static nscolor sButtonBackground;
|
||||
static nscolor sButtonText;
|
||||
static nscolor sButtonOuterLightBorder;
|
||||
|
|
|
@ -114,6 +114,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
case eColor_highlight: // CSS2 color
|
||||
case eColor_TextSelectBackground:
|
||||
case eColor__moz_menuhover:
|
||||
// XXX can probably just always use GetMacBrushColor here
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
res = GetMacBrushColor(kThemeBrushPrimaryHighlightColor, aColor, NS_RGB(0x00,0x00,0x00));
|
||||
|
@ -132,6 +133,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
case eColor_highlighttext: // CSS2 color
|
||||
case eColor_TextSelectForeground:
|
||||
case eColor__moz_menuhovertext:
|
||||
GetColor(eColor_TextSelectBackground, aColor);
|
||||
if (aColor == 0x000000)
|
||||
aColor = NS_RGB(0xff,0xff,0xff);
|
||||
|
@ -152,6 +154,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
//
|
||||
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
res = GetMacTextColor(kThemeTextColorPushButtonActive, aColor, NS_RGB(0x00,0x00,0x00));
|
||||
break;
|
||||
case eColor_captiontext:
|
||||
|
@ -194,6 +197,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
res = NS_OK;
|
||||
break;
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
res = GetMacBrushColor(kThemeBrushButtonFaceActive, aColor, NS_RGB(0xDD,0xDD,0xDD));
|
||||
break;
|
||||
case eColor_buttonhighlight:
|
||||
|
@ -269,12 +273,14 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
res = GetMacTextColor(kThemeTextColorDialogActive, aColor, NS_RGB(0x00,0x00,0x00));
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
// XXX There may be a better color for this, but I'm making it
|
||||
// the same as ThreeDFace since that's what's currently used where
|
||||
// I will use -moz-Dialog:
|
||||
res = GetMacBrushColor(kThemeBrushButtonFaceActive, aColor, NS_RGB(0xDD,0xDD,0xDD));
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
// XXX There may be a better color for this, but I'm making it
|
||||
// the same as WindowText since that's what's currently used where
|
||||
// I will use -moz-DialogText.
|
||||
|
|
|
@ -109,6 +109,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = SYSCLR_BACKGROUND;
|
||||
break;
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
idx = SYSCLR_BUTTONMIDDLE;
|
||||
break;
|
||||
case eColor_buttonhighlight:
|
||||
|
@ -118,6 +119,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = SYSCLR_BUTTONDARK;
|
||||
break;
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
idx = SYSCLR_MENUTEXT;
|
||||
break;
|
||||
case eColor_captiontext:
|
||||
|
@ -127,9 +129,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = SYSCLR_MENUDISABLEDTEXT;
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
idx = SYSCLR_HILITEBACKGROUND;
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
idx = SYSCLR_HILITEFOREGROUND;
|
||||
break;
|
||||
case eColor_inactiveborder:
|
||||
|
@ -187,9 +191,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = SYSCLR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
idx = SYSCLR_DIALOGBACKGROUND;
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
idx = SYSCLR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_buttondefault:
|
||||
|
|
|
@ -120,9 +120,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = PH_TO_NS_RGB(Pg_DGREY);
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
aColor = PH_TO_NS_RGB(0x9ba9c9); // bill blue
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
aColor = PH_TO_NS_RGB(Pg_BLACK);
|
||||
break;
|
||||
case eColor_inactiveborder:
|
||||
|
@ -151,6 +153,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
case eColor_threedface:
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
aColor = PH_TO_NS_RGB(Pg_LGREY);
|
||||
break;
|
||||
|
||||
|
@ -160,6 +163,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
aColor = PH_TO_NS_RGB(Pg_BLACK);
|
||||
break;
|
||||
|
||||
|
@ -200,10 +204,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
aColor = PH_TO_NS_RGB(Pg_LGREY);
|
||||
break;
|
||||
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
aColor = PH_TO_NS_RGB(Pg_BLACK);
|
||||
break;
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = COLOR_BACKGROUND;
|
||||
break;
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
idx = COLOR_BTNFACE;
|
||||
break;
|
||||
case eColor_buttonhighlight:
|
||||
|
@ -115,6 +116,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = COLOR_BTNSHADOW;
|
||||
break;
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
idx = COLOR_BTNTEXT;
|
||||
break;
|
||||
case eColor_captiontext:
|
||||
|
@ -124,9 +126,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = COLOR_GRAYTEXT;
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
idx = COLOR_HIGHLIGHT;
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
idx = COLOR_HIGHLIGHTTEXT;
|
||||
break;
|
||||
case eColor_inactiveborder:
|
||||
|
@ -184,9 +188,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
idx = COLOR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
idx = COLOR_3DFACE;
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
idx = COLOR_WINDOWTEXT;
|
||||
break;
|
||||
case eColor__moz_dragtargetzone:
|
||||
|
|
|
@ -113,9 +113,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x80, 0x80, 0x80);
|
||||
break;
|
||||
case eColor_highlight:
|
||||
case eColor__moz_menuhover:
|
||||
aColor = NS_RGB(0x00, 0x00, 0x9c);
|
||||
break;
|
||||
case eColor_highlighttext:
|
||||
case eColor__moz_menuhovertext:
|
||||
aColor = NS_RGB(0xff, 0xff, 0xff);
|
||||
break;
|
||||
case eColor_inactiveborder:
|
||||
|
@ -146,6 +148,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
case eColor_threedface:
|
||||
// 3-D face color
|
||||
case eColor_buttonface:
|
||||
case eColor__moz_buttonhoverface:
|
||||
// 3-D face color
|
||||
case eColor_threedlightshadow:
|
||||
// 3-D inner highlight color
|
||||
|
@ -160,6 +163,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
break;
|
||||
|
||||
case eColor_buttontext:
|
||||
case eColor__moz_buttonhovertext:
|
||||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
|
@ -191,9 +195,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
|||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
case eColor__moz_dialog:
|
||||
case eColor__moz_cellhighlight:
|
||||
aColor = NS_RGB(0xcc, 0xcc, 0xcc);
|
||||
break;
|
||||
case eColor__moz_dialogtext:
|
||||
case eColor__moz_cellhighlighttext:
|
||||
aColor = NS_RGB(0x00, 0x00, 0x00);
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче