Bug 282127: Highlight odd tree rows in trees with multiple columns in Gnomestripe and Pinstripe. Implement and use ::-moz-tree-row(multicol). ui-review=faaborg, r=enndeakin

This commit is contained in:
Steffen Wilberg 2010-05-12 20:25:48 +02:00
Родитель be38e11f0c
Коммит a7ac73ba96
5 изменённых файлов: 23 добавлений и 5 удалений

Просмотреть файл

@ -67,6 +67,15 @@ treechildren::-moz-tree-image(partial) {
list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); list-style-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif");
} }
/* undo odd row highlighting from tree.css */
treechildren::-moz-tree-row(odd) {
background-color: transparent;
}
treechildren::-moz-tree-row(odd, selected, focus) {
background-color: Highlight;
}
/* highlight "windows" instead */
treechildren::-moz-tree-row(alternate) { treechildren::-moz-tree-row(alternate) {
background-color: -moz-oddtreerow; background-color: -moz-oddtreerow;
} }

Просмотреть файл

@ -2037,6 +2037,10 @@ nsTreeBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsTreeColumn* aCol)
nsIContent* baseContent = GetBaseElement(); nsIContent* baseContent = GetBaseElement();
if (baseContent && baseContent->HasAttr(kNameSpaceID_None, nsGkAtoms::editing)) if (baseContent && baseContent->HasAttr(kNameSpaceID_None, nsGkAtoms::editing))
mScratchArray->AppendElement(nsGkAtoms::editing); mScratchArray->AppendElement(nsGkAtoms::editing);
// multiple columns
if (mColumns->GetColumnAt(1))
mScratchArray->AppendElement(nsGkAtoms::multicol);
} }
if (aCol) { if (aCol) {

Просмотреть файл

@ -127,7 +127,7 @@
persist="hidden width ordinal sortDirection"/> persist="hidden width ordinal sortDirection"/>
</treecols> </treecols>
<treechildren id="configTreeBody" alternatingbackground="true" ondblclick="if (event.button == 0) ModifySelected();"/> <treechildren id="configTreeBody" ondblclick="if (event.button == 0) ModifySelected();"/>
</tree> </tree>
</vbox> </vbox>
</deck> </deck>

Просмотреть файл

@ -75,11 +75,16 @@ treechildren::-moz-tree-row {
height: 1.3em; height: 1.3em;
} }
treechildren::-moz-tree-row(multicol, odd) {
background-color: -moz-oddtreerow;
}
treechildren::-moz-tree-row(selected) { treechildren::-moz-tree-row(selected) {
background-color: -moz-cellhighlight; background-color: -moz-cellhighlight;
} }
treechildren::-moz-tree-row(selected, focus) { treechildren::-moz-tree-row(selected, focus),
treechildren::-moz-tree-row(multicol, odd, selected, focus) {
background-color: Highlight; background-color: Highlight;
} }

Просмотреть файл

@ -65,19 +65,19 @@ treechildren::-moz-tree-row {
background-color: -moz-field; background-color: -moz-field;
} }
tree:not([hidecolumnpicker="true"]) treechildren::-moz-tree-row(odd) { treechildren::-moz-tree-row(multicol, odd) {
background-color: -moz-oddtreerow; background-color: -moz-oddtreerow;
} }
treechildren::-moz-tree-row(selected), treechildren::-moz-tree-row(selected),
treechildren::-moz-tree-row(odd, selected), treechildren::-moz-tree-row(odd, selected),
tree:not([hidecolumnpicker="true"]) treechildren::-moz-tree-row(odd, selected) { treechildren::-moz-tree-row(multicol, odd, selected) {
background-color: -moz-mac-secondaryhighlight; background-color: -moz-mac-secondaryhighlight;
} }
treechildren::-moz-tree-row(selected, focus), treechildren::-moz-tree-row(selected, focus),
treechildren::-moz-tree-row(odd, selected, focus), treechildren::-moz-tree-row(odd, selected, focus),
tree:not([hidecolumnpicker="true"]) treechildren::-moz-tree-row(odd, selected, focus) { treechildren::-moz-tree-row(multicol, odd, selected, focus) {
background-color: Highlight; background-color: Highlight;
color: HighlightText; color: HighlightText;
} }