Index: chrome/browser/resources/md_bookmarks/folder_node.html |
diff --git a/chrome/browser/resources/md_bookmarks/folder_node.html b/chrome/browser/resources/md_bookmarks/folder_node.html |
index 6f2c5afa57bf7487ae92509f6aa7a00ef7b2bd98..ac7ed435babbab5abfabc6627598d1ba95ee3cd8 100644 |
--- a/chrome/browser/resources/md_bookmarks/folder_node.html |
+++ b/chrome/browser/resources/md_bookmarks/folder_node.html |
@@ -12,6 +12,8 @@ |
<template> |
<style include="shared-style"> |
:host { |
+ --margin-left-per-depth: 36px; |
+ cursor: pointer; |
display: block; |
} |
@@ -22,24 +24,22 @@ |
} |
.menu-label { |
- -webkit-margin-start: 24px; |
+ -webkit-margin-start: 16px; |
color: var(--folder-inactive-color); |
font-weight: 500; |
- overflow: hidden; |
text-overflow: ellipsis; |
white-space: nowrap; |
} |
#container { |
height: 40px; |
- padding-left: calc(var(--node-depth, 0) * 30px); |
+ padding-left: calc(var(--node-depth, 0) * var(--margin-left-per-depth)); |
tsergeant
2017/03/14 03:38:51
Oops, didn't think about this last patch:
All the
calamity
2017/03/14 07:07:55
Done.
|
} |
#folder-label { |
color: var(--secondary-text-color); |
- cursor: pointer; |
flex-grow: 1; |
- overflow: hidden; |
+ padding-right: 8px; |
} |
:host([is-selected-folder_]) .menu-label, |
@@ -53,24 +53,36 @@ |
min-width: 20px; |
} |
- paper-icon-button { |
+ #arrow { |
color: var(--secondary-text-color); |
height: 36px; |
+ margin: 0 8px; |
min-width: 36px; |
- padding: 8px; |
+ transform: rotate(270deg); |
tsergeant
2017/03/14 03:38:51
You can make this look fancy pretty easily:
trans
calamity
2017/03/14 07:07:55
So delightful. Wow.
|
width: 36px; |
} |
+ |
+ #arrow[is-open] { |
+ transform: initial; |
+ } |
+ |
+ [no-children] { |
+ padding-left: 52px; |
tsergeant
2017/03/14 03:38:51
Can you put a comment in explaining where the magi
calamity
2017/03/14 07:07:55
Done.
|
+ } |
</style> |
- <div id="container" class="v-centered"> |
- <div id="folder-label" class="v-centered" on-tap="selectFolder_"> |
- <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]"></iron-icon> |
- <div class="menu-label">[[item_.title]]</div> |
- </div> |
+ <div id="container" class="v-centered" on-tap="selectFolder_"`> |
tsergeant
2017/03/14 03:38:51
There's a stray backtick at the end of the tag
calamity
2017/03/14 07:07:55
Oops.
|
<template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> |
- <paper-icon-button icon="[[getArrowIcon_(isClosed_)]]" |
- on-tap="toggleFolder_"></paper-icon-button> |
+ <paper-icon-button id="arrow" icon="cr:arrow-drop-down" |
+ is-open$="[[!isClosed_]]" on-tap="toggleFolder_"> |
tsergeant
2017/03/14 03:38:51
When you click this button, it will also call sele
calamity
2017/03/14 07:07:55
Oh good catch. Done.
|
+ </paper-icon-button> |
</template> |
+ <div id="folder-label" class="v-centered"> |
+ <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" |
+ no-children$="[[!hasChildFolder_(item_.children)]]"> |
+ </iron-icon> |
+ <div class="menu-label">[[item_.title]]</div> |
+ </div> |
</div> |
<div id="descendants" hidden$="[[isClosed_]]"> |
<template is="dom-repeat" |