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

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.html

Issue 2346383004: MD History: Update history-toolbar to use icon-button-light (Closed)
Patch Set: A Whole New World Created 4 years 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 unified diff | Download patch
OLDNEW
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/polymer/v1_0/iron-icon/iron-icon.htm l"> 2 <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/paper-icon-button/paper -icon-button.html">
4 <link rel="import" href="chrome://resources/cr_elements/icons.html"> 3 <link rel="import" href="chrome://resources/cr_elements/icons.html">
5 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r ender.html"> 4 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r ender.html">
6 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht ml"> 5 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht ml">
7 <link rel="import" href="chrome://history/browser_service.html"> 6 <link rel="import" href="chrome://history/browser_service.html">
8 <link rel="import" href="chrome://history/icons.html"> 7 <link rel="import" href="chrome://history/icons.html">
9 <link rel="import" href="chrome://history/shared_style.html"> 8 <link rel="import" href="chrome://history/shared_style.html">
10 9
11 <!-- Lazy loaded: iron-dropdown, paper-button, paper-icon-button-light, 10 <!-- Lazy loaded: iron-dropdown, paper-button, paper-icon-button-light,
12 paper-tab, paper-tabs. --> 11 paper-tab, paper-tabs. -->
13 12
14 <dom-module id="history-toolbar"> 13 <dom-module id="history-toolbar">
15 <template> 14 <template>
16 <style include="shared-style"> 15 <style include="shared-style">
17 :host { 16 :host {
18 color: #fff; 17 color: #fff;
19 display: block; 18 display: block;
20 transition: background-color 150ms; 19 transition: background-color 150ms;
21 width: 100%; 20 width: 100%;
22 } 21 }
23 22
23 /* General toolbar layout. */
calamity 2016/12/12 05:03:16 I like these.
24
24 cr-toolbar, 25 cr-toolbar,
25 #overlay-buttons, 26 #overlay-buttons,
26 #overlay-wrapper, 27 #overlay-wrapper,
27 #toolbar-container { 28 #toolbar-container {
28 align-items: center; 29 align-items: center;
29 display: flex; 30 display: flex;
30 width: 100%; 31 width: 100%;
31 } 32 }
32 33
33 :host([items-selected_]) { 34 :host([items-selected_]) {
(...skipping 21 matching lines...) Expand all
55 } 56 }
56 57
57 :host([has-drawer]) cr-toolbar { 58 :host([has-drawer]) cr-toolbar {
58 --cr-toolbar-field-margin: 0; 59 --cr-toolbar-field-margin: 0;
59 } 60 }
60 61
61 cr-toolbar .more-actions { 62 cr-toolbar .more-actions {
62 -webkit-margin-end: 12px; 63 -webkit-margin-end: 12px;
63 } 64 }
64 65
66 /* Info button and dropdown. */
67
65 #info-button { 68 #info-button {
66 /* Additional styles for unresolved <button>. */ 69 /* Additional styles for unresolved <button>. */
67 background: none; 70 background: none;
68 border: none; 71 border: none;
69 color: inherit; 72 color: inherit;
70 height: 32px; 73 height: 32px;
71 margin: 6px; 74 margin: 6px;
72 outline: none; 75 outline: none;
73 padding: 0; 76 padding: 0;
74 width: 32px; 77 width: 32px;
75 } 78 }
76 79
77 #info-button-icon { 80 #info-button-icon {
78 height: 20px; 81 height: 20px;
79 width: 20px; 82 width: 20px;
83 margin: 0 4px;
calamity 2016/12/12 05:03:16 This doesn't seem to do anything?
tsergeant 2016/12/12 23:54:56 You're right. I started this patch months ago, so
80 } 84 }
81 85
82 iron-dropdown { 86 iron-dropdown {
83 margin-top: 28px; /** Height of icon + 8px spacing. */ 87 margin-top: 28px; /** Height of icon + 8px spacing. */
84 } 88 }
85 89
86 .dropdown-content { 90 .dropdown-content {
87 @apply(--shadow-elevation-2dp); 91 @apply(--shadow-elevation-2dp);
88 background-color: white; 92 background-color: white;
89 border-radius: 2px; 93 border-radius: 2px;
90 color: var(--paper-grey-800); 94 color: var(--paper-grey-800);
91 overflow: hidden; 95 overflow: hidden;
92 padding: 12px 20px; 96 padding: 12px 20px;
93 } 97 }
94 98
99 /* Selection overlay. */
100
95 :host(:not([has-drawer])) #overlay-wrapper { 101 :host(:not([has-drawer])) #overlay-wrapper {
96 -webkit-margin-start: var(--side-bar-width); 102 -webkit-margin-start: var(--side-bar-width);
97 } 103 }
98 104
99 #overlay-buttons { 105 #overlay-buttons {
100 margin: 0 auto; 106 margin: 0 auto;
101 max-width: var(--card-max-width); 107 max-width: var(--card-max-width);
102 padding: 0 var(--card-padding-side); 108 padding: 0 var(--card-padding-side);
103 } 109 }
104 110
105 paper-button { 111 paper-button {
106 font-weight: 500; 112 font-weight: 500;
107 } 113 }
108 114
109 #number-selected { 115 #number-selected {
110 flex: 1; 116 flex: 1;
111 } 117 }
112 118
113 #cancel-icon-button { 119 #cancel-icon-button {
114 -webkit-margin-end: 24px; 120 -webkit-margin-end: 24px;
115 -webkit-margin-start: 2px; 121 -webkit-margin-start: 2px;
116 height: 36px;
117 min-width: 36px;
118 width: 36px;
119 } 122 }
120 123
121 #grouped-nav-container paper-icon-button { 124 /* Grouped toolbar. */
122 --paper-icon-button-ink-color: rgba(255, 255, 255, 0.4); 125
123 -webkit-margin-start: 24px; 126 paper-tabs {
124 flex: 0 0 auto; 127 --paper-tabs-selection-bar-color: #fff;
128 -webkit-margin-start: 32px;
calamity 2016/12/12 05:03:16 Hmm, just noticed that the mocks say this should b
tsergeant 2016/12/12 23:54:57 Acknowledged. This will be a fair amount of work,
calamity 2016/12/13 00:45:23 Yeah, for sure. I might take a look at date format
129 height: calc(var(--toolbar-grouped-height) - var(--toolbar-height));
130 min-width: 300px;
125 } 131 }
126 132
127 paper-tab { 133 paper-tab {
128 --paper-tab-ink: rgba(255, 255, 255, 0.4); 134 --paper-tab-ink: rgba(255, 255, 255, 0.4);
129 font-size: 13px; 135 font-size: 13px;
130 text-transform: uppercase; 136 text-transform: uppercase;
131 } 137 }
132 138
133 paper-tabs {
134 --paper-tabs-selection-bar-color: var(--google-blue-500);
135 height: calc(var(--toolbar-grouped-height) - var(--toolbar-height));
136 min-width: 300px;
137 }
138
139 #grouped-buttons-container { 139 #grouped-buttons-container {
140 align-items: center; 140 align-items: center;
141 display: flex; 141 display: flex;
142 } 142 }
143 143
144 #grouped-range-buttons {
145 -webkit-margin-start: 32px;
146 }
147
148 #grouped-nav-container { 144 #grouped-nav-container {
149 -webkit-margin-end: 24px; 145 -webkit-margin-end: 16px;
150 align-items: center; 146 align-items: center;
151 display: flex; 147 display: flex;
152 flex: 1; 148 flex: 1;
153 justify-content: flex-end; 149 justify-content: flex-end;
154 overflow: hidden; 150 overflow: hidden;
155 transition: opacity 150ms; 151 transition: opacity 150ms;
156 } 152 }
157 153
158 :host([grouped-range='0']) #grouped-nav-container { 154 :host([grouped-range='0']) #grouped-nav-container {
159 opacity: 0; 155 opacity: 0;
160 pointer-events: none; 156 pointer-events: none;
161 } 157 }
162 158
163 #grouped-date { 159 #grouped-date {
160 -webkit-margin-end: 8px;
164 flex: 0 1 auto; 161 flex: 0 1 auto;
165 opacity: 0.7; 162 opacity: 0.7;
166 overflow: hidden; 163 overflow: hidden;
167 text-align: right; 164 text-align: right;
168 text-overflow: ellipsis; 165 text-overflow: ellipsis;
169 white-space: nowrap; 166 white-space: nowrap;
170 } 167 }
171 168
169 #grouped-nav-container button {
170 -webkit-margin-start: 8px;
171 flex: 0 0 auto;
172 }
173
174 #grouped-nav-container button[disabled] {
175 color: rgba(255, 255, 255, 0.5);
176 }
177
172 :host-context([dir=rtl]) .rtl-reversible { 178 :host-context([dir=rtl]) .rtl-reversible {
173 transform: rotate(180deg); 179 transform: rotate(180deg);
174 } 180 }
175 </style> 181 </style>
176 <div id="toolbar-container"> 182 <div id="toolbar-container">
177 <cr-toolbar id="main-toolbar" 183 <cr-toolbar id="main-toolbar"
178 page-name="$i18n{title}" 184 page-name="$i18n{title}"
179 clear-label="$i18n{clearSearch}" 185 clear-label="$i18n{clearSearch}"
180 search-prompt="$i18n{searchPrompt}" 186 search-prompt="$i18n{searchPrompt}"
181 hidden$="[[itemsSelected_]]" 187 hidden$="[[itemsSelected_]]"
(...skipping 19 matching lines...) Expand all
201 <iron-dropdown vertical-align="top" horizontal-align="right" 207 <iron-dropdown vertical-align="top" horizontal-align="right"
202 allow-outside-scroll> 208 allow-outside-scroll>
203 <div class="dropdown-content"> 209 <div class="dropdown-content">
204 $i18nRaw{hasSyncedResults} 210 $i18nRaw{hasSyncedResults}
205 </div> 211 </div>
206 </iron-dropdown> 212 </iron-dropdown>
207 </template> 213 </template>
208 <template is="dom-if" if="[[itemsSelected_]]"> 214 <template is="dom-if" if="[[itemsSelected_]]">
209 <div id="overlay-wrapper" hidden$="[[!itemsSelected_]]"> 215 <div id="overlay-wrapper" hidden$="[[!itemsSelected_]]">
210 <div id="overlay-buttons"> 216 <div id="overlay-buttons">
211 <paper-icon-button icon="cr:clear" id="cancel-icon-button" 217 <button is="paper-icon-button-light"
212 on-tap="onClearSelectionTap_" title="$i18n{cancel}"> 218 id="cancel-icon-button"
213 </paper-icon-button> 219 class="icon-button"
220 on-tap="onClearSelectionTap_"
221 title="$i18n{cancel}">
222 <iron-icon icon="cr:clear"></iron-icon>
223 </button>
214 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div> 224 <div id="number-selected">[[numberOfItemsSelected_(count)]]</div>
215 <paper-button id="cancel-button" on-tap="onClearSelectionTap_"> 225 <paper-button id="cancel-button" on-tap="onClearSelectionTap_">
216 $i18n{cancel} 226 $i18n{cancel}
217 </paper-button> 227 </paper-button>
218 <paper-button id="delete-button" on-tap="onDeleteTap_"> 228 <paper-button id="delete-button" on-tap="onDeleteTap_">
219 $i18n{delete} 229 $i18n{delete}
220 </paper-button> 230 </paper-button>
221 </div> 231 </div>
222 </div> 232 </div>
223 </template> 233 </template>
224 </div> 234 </div>
225 <template is="dom-if" if="[[isGroupedMode]]"> 235 <template is="dom-if" if="[[isGroupedMode]]">
226 <div id="grouped-buttons-container"> 236 <div id="grouped-buttons-container">
227 <paper-tabs attr-for-selected="value" selected="{{groupedRange}}" 237 <paper-tabs attr-for-selected="value" selected="{{groupedRange}}">
228 id="grouped-range-buttons">
229 <paper-tab value="0">$i18n{rangeAllTime}</paper-tab> 238 <paper-tab value="0">$i18n{rangeAllTime}</paper-tab>
230 <paper-tab value="1">$i18n{rangeWeek}</paper-tab> 239 <paper-tab value="1">$i18n{rangeWeek}</paper-tab>
231 <paper-tab value="2">$i18n{rangeMonth}</paper-tab> 240 <paper-tab value="2">$i18n{rangeMonth}</paper-tab>
232 </paper-tabs> 241 </paper-tabs>
233 <div id="grouped-nav-container"> 242 <div id="grouped-nav-container">
234 <span id="grouped-date"> 243 <span id="grouped-date">
235 {{getHistoryInterval_(queryStartTime, queryEndTime)}} 244 {{getHistoryInterval_(queryStartTime, queryEndTime)}}
236 </span> 245 </span>
237 <paper-icon-button id="today-button" icon="history:today" 246 <button is="paper-icon-button-light"
238 alt="$i18n{rangeToday}" 247 id="today-button"
248 class="icon-button"
239 title="$i18n{rangeToday}" 249 title="$i18n{rangeToday}"
240 on-tap="onTodayTap_" 250 on-tap="onTodayTap_"
241 disabled="[[isToday_(groupedOffset)]]"></paper-icon-button> 251 disabled="[[isToday_(groupedOffset)]]">
242 <paper-icon-button id="prev-button" icon="history:chevron-left" 252 <iron-icon icon="history:today"></iron-icon>
243 alt="$i18n{rangePrevious}" 253 </button>
254 <button is="paper-icon-button-light"
255 id="prev-button"
244 title="$i18n{rangePrevious}" 256 title="$i18n{rangePrevious}"
245 class="rtl-reversible" 257 class="icon-button rtl-reversible"
246 on-tap="onPrevTap_" 258 on-tap="onPrevTap_"
247 disabled="[[!hasMoreResults]]"></paper-icon-button> 259 disabled="[[!hasMoreResults]]">
248 <paper-icon-button id="next-button" icon="cr:chevron-right" 260 <iron-icon icon="history:chevron-left"></iron-icon>
249 alt="$i18n{rangeNext}" 261 </button>
262 <button is="paper-icon-button-light"
263 id="next-button"
250 title="$i18n{rangeNext}" 264 title="$i18n{rangeNext}"
251 class="rtl-reversible" 265 class="icon-button rtl-reversible"
252 on-tap="onNextTap_" 266 on-tap="onNextTap_"
253 disabled="[[isToday_(groupedOffset)]]"></paper-icon-button> 267 disabled="[[isToday_(groupedOffset)]]">
268 <iron-icon icon="cr:chevron-right"></iron-icon>
269 </button>
254 </div> 270 </div>
255 </div> 271 </div>
256 </template> 272 </template>
257 </template> 273 </template>
258 <script src="chrome://history/history_toolbar.js"></script> 274 <script src="chrome://history/history_toolbar.js"></script>
259 </dom-module> 275 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | chrome/browser/resources/md_history/lazy_load.vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698