| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> | |
| 6 <link rel="import" href="chrome://bookmarks/actions.html"> | 5 <link rel="import" href="chrome://bookmarks/actions.html"> |
| 7 <link rel="import" href="chrome://bookmarks/icons.html"> | 6 <link rel="import" href="chrome://bookmarks/icons.html"> |
| 8 <link rel="import" href="chrome://bookmarks/shared_style.html"> | 7 <link rel="import" href="chrome://bookmarks/shared_style.html"> |
| 9 <link rel="import" href="chrome://bookmarks/store_client.html"> | 8 <link rel="import" href="chrome://bookmarks/store_client.html"> |
| 10 | 9 |
| 11 <dom-module id="bookmarks-folder-node"> | 10 <dom-module id="bookmarks-folder-node"> |
| 12 <template> | 11 <template> |
| 13 <style include="shared-style"> | 12 <style include="shared-style"> |
| 14 :host { | 13 :host { |
| 15 --padding-start-per-depth: 36px; | 14 --padding-start-per-depth: 36px; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 45 flex-grow: 1; | 44 flex-grow: 1; |
| 46 overflow: hidden; | 45 overflow: hidden; |
| 47 } | 46 } |
| 48 | 47 |
| 49 :host([is-selected-folder_]) .menu-label, | 48 :host([is-selected-folder_]) .menu-label, |
| 50 :host([is-selected-folder_]) #folder-label { | 49 :host([is-selected-folder_]) #folder-label { |
| 51 color: var(--interactive-color); | 50 color: var(--interactive-color); |
| 52 } | 51 } |
| 53 | 52 |
| 54 iron-icon { | 53 iron-icon { |
| 55 --iron-icon-height: 20px; | 54 flex-shrink: 0; |
| 56 --iron-icon-width: 20px; | |
| 57 min-width: 20px; | |
| 58 } | 55 } |
| 59 | 56 |
| 60 #arrow { | 57 #arrow { |
| 61 color: var(--secondary-text-color); | 58 color: var(--secondary-text-color); |
| 62 height: 36px; | |
| 63 margin: 0 8px; | 59 margin: 0 8px; |
| 64 min-width: 36px; | |
| 65 transform: rotate(-90deg); | 60 transform: rotate(-90deg); |
| 66 transition: transform 150ms; | 61 transition: transform 150ms; |
| 67 width: 36px; | |
| 68 } | 62 } |
| 69 | 63 |
| 70 :host-context([dir='rtl']) #arrow { | 64 :host-context([dir='rtl']) #arrow { |
| 71 transform: rotate(90deg); | 65 transform: rotate(90deg); |
| 72 } | 66 } |
| 73 | 67 |
| 74 #arrow[is-open] { | 68 #arrow[is-open] { |
| 75 transform: initial; | 69 transform: initial; |
| 76 } | 70 } |
| 77 | 71 |
| 78 [no-children] { | 72 [no-children] { |
| 79 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ | 73 -webkit-padding-start: 52px; /* The width of the arrow and its margin */ |
| 80 } | 74 } |
| 81 </style> | 75 </style> |
| 82 | 76 |
| 83 <div id="container" class="v-centered" on-tap="selectFolder_" | 77 <div id="container" class="v-centered" on-tap="selectFolder_" |
| 84 draggable="[[!isTopLevelFolder_(depth)]]" | 78 draggable="[[!isTopLevelFolder_(depth)]]" |
| 85 hidden="[[isRootFolder_(depth)]]"> | 79 hidden="[[isRootFolder_(depth)]]"> |
| 86 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> | 80 <template is="dom-if" if="[[hasChildFolder_(item_.children)]]"> |
| 87 <paper-icon-button id="arrow" icon="cr:arrow-drop-down" | 81 <button is="paper-icon-button-light" id="arrow" |
| 88 is-open$="[[!isClosed_]]" on-tap="toggleFolder_"> | 82 is-open$="[[!isClosed_]]" on-tap="toggleFolder_"> |
| 89 </paper-icon-button> | 83 <iron-icon icon="cr:arrow-drop-down"></iron-icon> |
| 84 </button> |
| 90 </template> | 85 </template> |
| 91 <div id="folder-label" class="v-centered"> | 86 <div id="folder-label" class="v-centered"> |
| 92 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" | 87 <iron-icon icon="[[getFolderIcon_(isSelectedFolder_)]]" |
| 93 no-children$="[[!hasChildFolder_(item_.children)]]"> | 88 no-children$="[[!hasChildFolder_(item_.children)]]"> |
| 94 </iron-icon> | 89 </iron-icon> |
| 95 <div class="menu-label">[[item_.title]]</div> | 90 <div class="menu-label">[[item_.title]]</div> |
| 96 </div> | 91 </div> |
| 97 </div> | 92 </div> |
| 98 <div id="descendants" hidden$="[[isClosed_]]"> | 93 <div id="descendants" hidden$="[[isClosed_]]"> |
| 99 <template is="dom-repeat" | 94 <template is="dom-repeat" |
| 100 items="[[item_.children]]" | 95 items="[[item_.children]]" |
| 101 as="child" | 96 as="child" |
| 102 filter="isFolder_"> | 97 filter="isFolder_"> |
| 103 <bookmarks-folder-node item-id="[[child]]" | 98 <bookmarks-folder-node item-id="[[child]]" |
| 104 depth="[[getChildDepth_(depth)]]"> | 99 depth="[[getChildDepth_(depth)]]"> |
| 105 </bookmarks-folder-node> | 100 </bookmarks-folder-node> |
| 106 </template> | 101 </template> |
| 107 </div> | 102 </div> |
| 108 </template> | 103 </template> |
| 109 <script src="chrome://bookmarks/folder_node.js"></script> | 104 <script src="chrome://bookmarks/folder_node.js"></script> |
| 110 </dom-module> | 105 </dom-module> |
| OLD | NEW |