Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2611)

Unified Diff: chrome/browser/resources/shared/css/tree.css

Issue 8341081: Add icon-visibility attribute to cr.ui.Tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/shared/css/tree.css
diff --git a/chrome/browser/resources/shared/css/tree.css b/chrome/browser/resources/shared/css/tree.css
index ac0b1de29f7d746c93c3a4026483f5f4403396ce..6acf1127611092d2d4b5bf645d0fd6d0c383c550 100644
--- a/chrome/browser/resources/shared/css/tree.css
+++ b/chrome/browser/resources/shared/css/tree.css
@@ -99,11 +99,26 @@ tree:focus .tree-row[selected] {
}
.tree-label {
+ white-space: pre;
+}
+
+tree[icon-visibility] .tree-label {
-webkit-padding-start: 20px;
- background-image: url("../../../../../ui/resources/folder_closed.png");
background-position: 0 50%;
background-repeat: no-repeat;
- white-space: pre;
+}
+
+tree[icon-visibility='all'] .tree-label,
arv (Not doing code reviews) 2011/10/28 00:03:40 remove quotes for consistency... oh it is already
flackr 2011/10/28 15:19:36 Done.
+tree[icon-visibility='parent'] .tree-row[may-have-children] > .tree-label {
+ background-image: url("../../../../../ui/resources/folder_closed.png");
+}
+
+tree[icon-visibility='parent'] .tree-row[has-children=false] > .tree-label {
+ background-image: none;
+}
+
+tree[icon-visibility] .tree-item[expanded] > .tree-row > .tree-label {
+ background-image: url("../../../../../ui/resources/folder_open.png");
}
/* We need to ensure that even empty labels take up space */
@@ -124,15 +139,14 @@ html[dir=rtl] .tree-label {
background-position: 100% 50%;
}
-.tree-item[expanded] > .tree-row > .tree-label {
- background-image: url("../../../../../ui/resources/folder_open.png");
-}
-
-html[dir='rtl'] .tree-label {
+html[dir='rtl'] tree[icon-visibility='all'] .tree-label,
+html[dir='rtl'] tree[icon-visibility='parent'] .tree-row[may-have-children]
+ > .tree-label {
background-image: url("../../../../../ui/resources/folder_closed_rtl.png");
}
-html[dir='rtl'] .tree-item[expanded] > .tree-row > .tree-label {
+html[dir='rtl'] tree[icon-visibility] .tree-item[expanded] > .tree-row
+ > .tree-label {
background-image: url("../../../../../ui/resources/folder_open_rtl.png");
}

Powered by Google App Engine
This is Rietveld 408576698