OLD | NEW |
1 <link rel="import" href="chrome://downloads/action_service.html"> | 1 <link rel="import" href="chrome://downloads/action_service.html"> |
2 <link rel="import" href="chrome://resources/html/assert.html"> | 2 <link rel="import" href="chrome://resources/html/assert.html"> |
3 <link rel="import" href="chrome://resources/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
5 <link rel="import" href="chrome://resources/html/util.html"> | 5 <link rel="import" href="chrome://resources/html/util.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu-button/paper
-menu-button.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu-button/paper
-menu-button.html"> |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
10 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> | 10 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.ht
ml"> |
11 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 11 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
12 | 12 |
13 <dom-module id="downloads-toolbar"> | 13 <dom-module id="downloads-toolbar"> |
14 <template> | 14 <template> |
| 15 <style> |
| 16 :host { |
| 17 align-items: center; |
| 18 background: var(--md-toolbar-color); |
| 19 color: white; |
| 20 display: flex; |
| 21 min-height: 56px; |
| 22 } |
| 23 |
| 24 [hidden] { |
| 25 display: none !important; |
| 26 } |
| 27 |
| 28 #toolbar { |
| 29 --cr-toolbar-field-end-padding: 0; |
| 30 --cr-toolbar-field-width: var(--downloads-card-width); |
| 31 --cr-toolbar-header-wide: { |
| 32 -webkit-margin-start: 24px; |
| 33 -webkit-margin-end: 16px; /* Only matters around 900px in Russian. */ |
| 34 }; |
| 35 --cr-toolbar-left-content-wide: { |
| 36 -webkit-margin-start: 0; |
| 37 flex: 1 0 1px; |
| 38 max-width: none; |
| 39 position: static; |
| 40 }; |
| 41 --cr-toolbar-right-content-wide: { |
| 42 flex: 1 0 1px; |
| 43 position: static; |
| 44 }; |
| 45 align-items: center; |
| 46 flex: 1; |
| 47 } |
| 48 |
| 49 paper-icon-button { |
| 50 --iron-icon-height: 20px; |
| 51 --iron-icon-width: 20px; |
| 52 --paper-icon-button: { |
| 53 height: 32px; |
| 54 padding: 6px; |
| 55 width: 32px; |
| 56 }; |
| 57 } |
| 58 |
| 59 .more-actions { |
| 60 -webkit-margin-end: 16px; |
| 61 -webkit-margin-start: 8px; |
| 62 text-align: end; |
| 63 } |
| 64 |
| 65 #more { |
| 66 --paper-menu-button: { |
| 67 padding: 0; |
| 68 }; |
| 69 } |
| 70 |
| 71 paper-menu { |
| 72 --paper-menu-selected-item: { |
| 73 font-weight: normal; |
| 74 }; |
| 75 } |
| 76 |
| 77 paper-item { |
| 78 -webkit-user-select: none; |
| 79 cursor: pointer; |
| 80 font: inherit; |
| 81 min-height: 40px; |
| 82 /* TODO(michaelpg): fix this for everybody ever. |
| 83 * https://github.com/PolymerElements/paper-menu-button/issues/56 */ |
| 84 white-space: nowrap; |
| 85 } |
| 86 </style> |
15 <cr-toolbar id="toolbar" page-name="$i18n{title}" | 87 <cr-toolbar id="toolbar" page-name="$i18n{title}" |
16 search-prompt="$i18n{search}" clear-label="$i18n{clearSearch}" | 88 search-prompt="$i18n{search}" clear-label="$i18n{clearSearch}" |
17 spinner-active="{{spinnerActive}}" on-search-changed="onSearchChanged_"> | 89 spinner-active="{{spinnerActive}}" on-search-changed="onSearchChanged_"> |
18 <div class="more-actions"> | 90 <div class="more-actions"> |
19 <paper-menu-button id="more" horizontal-align="right" | 91 <paper-menu-button id="more" horizontal-align="right" |
20 allow-outside-scroll> | 92 allow-outside-scroll> |
21 <paper-icon-button icon="cr:more-vert" title="$i18n{moreActions}" | 93 <paper-icon-button icon="cr:more-vert" title="$i18n{moreActions}" |
22 class="dropdown-trigger"></paper-icon-button> | 94 class="dropdown-trigger"></paper-icon-button> |
23 <paper-menu class="dropdown-content"> | 95 <paper-menu class="dropdown-content"> |
24 <paper-item class="clear-all" on-tap="onClearAllTap_" | 96 <paper-item class="clear-all" on-tap="onClearAllTap_" |
25 on-blur="onItemBlur_"> | 97 on-blur="onItemBlur_"> |
26 $i18n{clearAll} | 98 $i18n{clearAll} |
27 </paper-item> | 99 </paper-item> |
28 <paper-item on-tap="onOpenDownloadsFolderTap_" | 100 <paper-item on-tap="onOpenDownloadsFolderTap_" |
29 on-blur="onItemBlur_"> | 101 on-blur="onItemBlur_"> |
30 $i18n{openDownloadsFolder} | 102 $i18n{openDownloadsFolder} |
31 </paper-item> | 103 </paper-item> |
32 </paper-menu> | 104 </paper-menu> |
33 </paper-menu-button> | 105 </paper-menu-button> |
34 </div> | 106 </div> |
35 </cr-toolbar> | 107 </cr-toolbar> |
36 </template> | 108 </template> |
37 <link rel="import" type="css" href="chrome://downloads/shared_style.css"> | |
38 <link rel="import" type="css" href="chrome://downloads/toolbar.css"> | |
39 <script src="chrome://downloads/toolbar.js"></script> | 109 <script src="chrome://downloads/toolbar.js"></script> |
40 </dom-module> | 110 </dom-module> |
OLD | NEW |