Chromium Code Reviews| Index: chrome/browser/resources/md_history/history_toolbar.html |
| diff --git a/chrome/browser/resources/md_history/history_toolbar.html b/chrome/browser/resources/md_history/history_toolbar.html |
| index f79d46e7d5854c1ac0c9887f563907dffeb56544..686febc702afc553b572686977571c6040731a25 100644 |
| --- a/chrome/browser/resources/md_history/history_toolbar.html |
| +++ b/chrome/browser/resources/md_history/history_toolbar.html |
| @@ -2,7 +2,10 @@ |
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/hardware-icons.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-tabs/paper-tab.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-tabs/paper-tabs.html"> |
| <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_search_field.html"> |
| <link rel="import" href="chrome://history/shared_style.html"> |
| @@ -11,11 +14,10 @@ |
| <style include="shared-style"> |
| :host { |
| color: #fff; |
| - height: 56px; |
| transition: background-color 150ms; |
| + width: 100%; |
| } |
| - :host, |
| #overlay-buttons, |
| #overlay-wrapper, |
| #main-content, |
| @@ -37,6 +39,10 @@ |
| font-weight: 400; |
| } |
| + #toolbar-container { |
| + height: 56px; |
| + } |
| + |
| #right-content { |
| flex: 1 0 0; |
| } |
| @@ -83,7 +89,7 @@ |
| @apply(--layout-flex); |
| } |
| - paper-icon-button { |
| + #cancel-icon-button { |
| -webkit-margin-end: 24px; |
| -webkit-margin-start: 2px; |
| height: 36px; |
| @@ -91,8 +97,60 @@ |
| width: 36px; |
| } |
| - paper-button { |
| - pointer-events: auto; |
| + #grouped-nav-container paper-icon-button { |
| + --paper-icon-button-ink-color: rgba(255, 255, 255, 0.4); |
| + -webkit-margin-start: 24px; |
| + flex: 0 0 auto; |
| + } |
| + |
| + paper-tab { |
| + --paper-tab-ink: rgba(255, 255, 255, 0.4); |
| + text-transform: uppercase; |
|
tsergeant
2016/05/11 04:19:29
Nit: Move this line down one for sorting reasons.
calamity
2016/05/12 07:27:06
Done.
|
| + font-size: 13px; |
| + } |
| + |
| + paper-tabs { |
| + --paper-tabs-selection-bar-color: var(--google-blue-500); |
| + height: 45px; |
| + min-width: 300px; |
| + } |
| + |
| + #grouped-buttons-container { |
| + -webkit-margin-start: var(--side-bar-width); |
| + @apply(--layout-center); |
|
tsergeant
2016/05/11 04:19:29
Nit: @apply comes first, then --variable lines, th
calamity
2016/05/12 07:27:06
Done.
|
| + @apply(--layout-horizontal); |
| + } |
| + |
| + #grouped-period-buttons { |
| + -webkit-margin-start: 32px; |
| + } |
| + |
| + #grouped-nav-container { |
| + -webkit-margin-end: 24px; |
|
tsergeant
2016/05/11 04:19:29
Move this down, as above.
calamity
2016/05/12 07:27:06
Done.
|
| + @apply(--layout-center); |
| + @apply(--layout-end-justified); |
| + @apply(--layout-flex); |
| + @apply(--layout-horizontal); |
| + overflow: hidden; |
| + transition: opacity 150ms; |
| + } |
| + |
| + :host([grouped-period=all]) #grouped-nav-container { |
| + opacity: 0; |
| + pointer-events: none; |
| + } |
| + |
| + #grouped-date { |
| + flex: 0 1 auto; |
| + opacity: 0.7; |
| + overflow: hidden; |
| + text-align: right; |
| + text-overflow: ellipsis; |
| + white-space: nowrap; |
| + } |
| + |
| + :host([is-rtl_]) .rtl-reversible { |
|
tsergeant
2016/05/11 04:19:29
psst,
here's a trick you won't find anywhere else
calamity
2016/05/12 07:27:06
Gnarly.
Dan Beam
2016/05/12 19:34:29
http://robdodson.me/shadow-dom-css-cheat-sheet/#ho
|
| + transform: rotate(180deg); |
| } |
| </style> |
| <div id="toolbar-container"> |
| @@ -125,6 +183,29 @@ |
| </div> |
| </div> |
| </div> |
| + <template is="dom-if" if="[[isGroupedMode]]"> |
| + <div id="grouped-buttons-container"> |
| + <paper-tabs attr-for-selected="value" selected="{{groupedPeriod}}" |
| + id="grouped-period-buttons"> |
| + <paper-tab value="0">$i18n{rangeAllTime}</paper-tab> |
| + <paper-tab value="1">$i18n{rangeWeek}</paper-tab> |
| + <paper-tab value="2">$i18n{rangeMonth}</paper-tab> |
| + </paper-tabs> |
| + <div id="grouped-nav-container"> |
| + <span id="grouped-date"> |
| + {{getHistoryInterval_(queryStartTime, queryEndTime)}} |
| + </span> |
| + <paper-icon-button icon="today" alt="$i18n{rangeToday}" |
| + title="$i18n{rangeToday}"></paper-icon-button> |
| + <paper-icon-button icon="hardware:keyboard-arrow-left" |
| + alt="$i18n{rangePrevious}" title="$i18n{rangePrevious}" |
| + class="rtl-reversible"></paper-icon-button> |
| + <paper-icon-button icon="hardware:keyboard-arrow-right" |
| + alt="$i18n{rangeNext}" title="$i18n{rangeNext}" |
| + class="rtl-reversible"></paper-icon-button> |
| + </div> |
| + </div> |
| + </template> |
| </template> |
| <script src="chrome://history/history_toolbar.js"></script> |
| </dom-module> |