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

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: Define property on cr.ui.Tree and fix style. 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..9f90a25b0fcc750802eb42ba2fe7c25ec82aa32a 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 {
arv (Not doing code reviews) 2011/10/28 16:15:12 Sorry, I should have paid more attention the first
flackr 2011/10/28 22:32:50 If A and C are the same then this needs to change.
arv (Not doing code reviews) 2011/10/28 22:41:03 To me, the important part is that <tree> does not
flackr 2011/10/31 14:37:56 Okay, the default behaviour will be as it was befo
-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,
+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