Bug 420726 - Use system background color for odd tree rows. ui-r=beltzner, r=josh+Mano, sr=roc, a1.9=beltzner.

This commit is contained in:
stefanh@inbox.com 2008-03-29 04:43:31 -07:00
parent 9f71a4b939
commit cc88857f09
7 changed files with 12 additions and 20 deletions

View File

@ -206,21 +206,6 @@
padding-top: 1px;
}
#placeContent treechildren::-moz-tree-row(odd) {
background-color: #edf3fe;
}
#placeContent treechildren::-moz-tree-row(selected),
#placeContent treechildren::-moz-tree-row(odd, selected) {
background-color: -moz-mac-secondaryhighlight;
}
#placeContent treechildren::-moz-tree-row(selected, focus),
#placeContent treechildren::-moz-tree-row(odd, selected, focus) {
background-color: Highlight;
color: HighlightText !important;
}
#placeContent treechildren::-moz-tree-cell,
#placeContent treechildren::-moz-tree-column {
border-right: 1px solid #d7dad7;

View File

@ -154,6 +154,7 @@ CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
CSS_KEY(-moz-min-content, _moz_min_content)
CSS_KEY(-moz-myanmar, _moz_myanmar)
CSS_KEY(-moz-none, _moz_none)
CSS_KEY(-moz-oddrowbackground, _moz_oddrowbackground)
CSS_KEY(-moz-oriya, _moz_oriya)
CSS_KEY(-moz-persian, _moz_persian)
CSS_KEY(-moz-popup, _moz_popup)

View File

@ -462,6 +462,7 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
eCSSKeyword__moz_menuhover, nsILookAndFeel::eColor__moz_menuhover,
eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext,
eCSSKeyword__moz_menubarhovertext, nsILookAndFeel::eColor__moz_menubarhovertext,
eCSSKeyword__moz_oddrowbackground, nsILookAndFeel::eColor__moz_oddrowbackground,
eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT,
eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR,
eCSSKeyword_UNKNOWN,-1

View File

@ -69,13 +69,13 @@ tree {
/* ::::: tree rows ::::: */
treechildren::-moz-tree-row {
border-top: 1px solid -moz-field;
border-top: 1px solid transparent;
height: 18px;
background-color: #fff;
background-color: -moz-field;
}
tree:not([hidecolumnpicker="true"]) treechildren::-moz-tree-row(odd) {
background-color: #f0f0f0;
background-color: -moz-oddrowbackground;
}
treechildren::-moz-tree-row(selected),
@ -369,7 +369,7 @@ treechildren::-moz-tree-cell-text(Name, separator, selected, focus) {
/* ::::: alternating background ::::: */
treechildren[alternatingbackground="true"]::-moz-tree-row(odd) {
background-color: #f3f3f3;
background-color: -moz-oddrowbackground;
}
treechildren[alternatingbackground="true"]::-moz-tree-row(odd, selected) {

View File

@ -13,7 +13,7 @@ richlistitem[type="download"] {
}
richlistitem[type="download"][alternate="true"]:not([selected="true"]) {
background-color: #EDF3FE;
background-color: -moz-oddrowbackground;
}
richlistitem[type="download"] .name {

View File

@ -136,6 +136,7 @@ public:
eColor__moz_menuhover, //used to menu item background, when mouse is over
eColor__moz_menuhovertext, //used to menu item text, when mouse is over
eColor__moz_menubarhovertext, //used to menu bar item text, when mouse is over
eColor__moz_oddrowbackground, //background color of odd list rows
//colours needed by Mac Classic skin
eColor__moz_mac_focusring, //ring around text fields and lists

View File

@ -342,6 +342,10 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
// For inactive list selection
res = GetMacBrushColor(kThemeBrushSecondaryHighlightColor, aColor, NS_RGB(0x00,0x00,0x00));
break;
case eColor__moz_oddrowbackground:
// Background color of odd list rows. Note that Apple's row index is different from ours.
res = GetMacBrushColor(kThemeBrushListViewEvenRowBackground, aColor, NS_RGB(0xF0,0xF0,0xF0));
break;
default:
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
aColor = NS_RGB(0xff,0xff,0xff);