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/polymer/v1_0/paper-drawer-panel/pape
r-drawer-panel.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-drawer-panel/pape
r-drawer-panel.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-header-panel/pape
r-header-panel.html"> |
3 <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.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm
l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/typography
.html"> | |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-too
lbar.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-too
lbar.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
9 <link rel="import" href="chrome://md-settings/direction_delegate.html"> | 9 <link rel="import" href="chrome://md-settings/direction_delegate.html"> |
10 <link rel="import" href="chrome://md-settings/i18n_setup.html"> | 10 <link rel="import" href="chrome://md-settings/i18n_setup.html"> |
11 <link rel="import" href="chrome://md-settings/icons.html"> | 11 <link rel="import" href="chrome://md-settings/icons.html"> |
12 <link rel="import" href="chrome://md-settings/settings_main/settings_main.html"> | 12 <link rel="import" href="chrome://md-settings/settings_main/settings_main.html"> |
13 <link rel="import" href="chrome://md-settings/settings_menu/settings_menu.html"> | 13 <link rel="import" href="chrome://md-settings/settings_menu/settings_menu.html"> |
14 <link rel="import" href="chrome://md-settings/settings_page/settings_router.html
"> | 14 <link rel="import" href="chrome://md-settings/settings_page/settings_router.html
"> |
15 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> | 15 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> |
16 | 16 |
17 <dom-module id="settings-ui"> | 17 <dom-module id="settings-ui"> |
18 <template> | 18 <template> |
19 <style include="settings-shared"> | 19 <style include="settings-shared"> |
20 :host { | 20 :host { |
21 @apply(--layout-vertical); | 21 @apply(--layout-vertical); |
22 @apply(--layout-fit); | 22 @apply(--layout-fit); |
23 -webkit-user-select: none; | 23 -webkit-user-select: none; |
24 background-color: var(--settings-background-color); | 24 background-color: var(--settings-background-color); |
25 } | 25 } |
26 | 26 |
27 iron-icon { | |
28 --iron-icon-fill-color: var(--settings-title-bar-color); | |
29 } | |
30 | |
31 paper-toolbar { | |
32 @apply(--shadow-elevation-4dp); | |
33 --paper-toolbar-title: { | |
34 font-size: 123.08%; | |
35 }; | |
36 background-color: var(--settings-title-bar-background-color); | |
37 min-height: 56px; | |
38 position: relative; | |
39 z-index: 10; | |
40 } | |
41 | |
42 paper-drawer-panel { | 27 paper-drawer-panel { |
43 @apply(--layout-center); | 28 @apply(--layout-center); |
44 --paper-drawer-panel-left-drawer-container: { | 29 --paper-drawer-panel-left-drawer-container: { |
45 background-color: var(--settings-background-color); | 30 background-color: var(--settings-background-color); |
46 margin-top: 8px; | |
47 }; | 31 }; |
48 --paper-drawer-panel-right-drawer-container: { | 32 --paper-drawer-panel-right-drawer-container: { |
49 background-color: var(--settings-background-color); | 33 background-color: var(--settings-background-color); |
50 margin-top: 8px; | |
51 }; | 34 }; |
52 position: relative; | 35 position: relative; |
53 } | 36 } |
54 | 37 |
55 settings-main paper-icon-button { | 38 paper-icon-button { |
56 z-index: 10; | 39 --iron-icon-fill-color: var(--settings-title-bar-color); |
| 40 } |
| 41 |
| 42 paper-icon-button[suffix] { |
| 43 --iron-icon-fill-color: var(--settings-title-search-color); |
| 44 height: 32px; /* After padding, the icon size is 16px. */ |
| 45 width: 32px; |
| 46 } |
| 47 |
| 48 paper-input { |
| 49 @apply(--layout-center); |
| 50 --paper-input-container: { |
| 51 padding-top: 0; |
| 52 }; |
| 53 --paper-input-container-color: var(--settings-title-search-color); |
| 54 --paper-input-container-focus-color: var(--settings-title-search-color); |
| 55 --paper-input-container-input: { |
| 56 font-size: 81.25%; /* go to 13px from 16px */ |
| 57 position: relative; |
| 58 top: 3px; /* Special positioning needed for UX design. */ |
| 59 }; |
| 60 |
| 61 /* |
| 62 * The button in the input suffix needs special positioning for the UX |
| 63 * design. The hit box extends right and down from the paper-input |
| 64 * underline. |
| 65 */ |
| 66 --paper-input-suffix: { |
| 67 left: 8px; |
| 68 line-height: 16px; |
| 69 position: relative; |
| 70 top: 4px; |
| 71 }; |
| 72 --paper-input-container-input-color: var(--settings-title-bar-color); |
| 73 --paper-input-container-label: { |
| 74 font-size: 81.25%; /* go to 13px from 16px */ |
| 75 top: 3px; /* Special positioning needed for UX design. */ |
| 76 }; |
| 77 --paper-input-max-width: 200px; |
| 78 } |
| 79 |
| 80 paper-toolbar { |
| 81 --paper-toolbar-height: 56px; |
| 82 --paper-toolbar-sm-height: 56px; |
| 83 --paper-toolbar-content: { |
| 84 font-size: 123.08%; /* go to 16px from 13px */ |
| 85 } |
| 86 --paper-toolbar: { |
| 87 background-color: var(--settings-title-bar-background-color); |
| 88 }; |
| 89 } |
| 90 |
| 91 /* Prevent paper-toolbar from setting the margin-right to 24px. */ |
| 92 paper-icon-button#menu-button { |
| 93 /* |
| 94 * TODO(dschuyler): this margin is on the right regardless of language |
| 95 * direction (e.g. rtl). Make a patch for paper-toolbar in Polymer. |
| 96 */ |
| 97 margin-right: 0; |
| 98 } |
| 99 |
| 100 .heading { |
| 101 -webkit-margin-start: 8px; |
| 102 } |
| 103 |
| 104 paper-drawer-panel:not([narrow]) #main-title { |
| 105 display: none; |
| 106 } |
| 107 |
| 108 paper-icon-button[toggles]:not([active]) + #search-input { |
| 109 display: none; |
| 110 } |
| 111 |
| 112 .last { |
| 113 display: flex; |
| 114 justify-content: flex-end; |
| 115 width: 100%; |
57 } | 116 } |
58 </style> | 117 </style> |
59 <settings-router current-route="{{currentRoute}}" | 118 <settings-router current-route="{{currentRoute}}" |
60 current-route-titles="{{currentRouteTitles}}"> | 119 current-route-titles="{{currentRouteTitles}}"> |
61 </settings-router> | 120 </settings-router> |
62 <paper-toolbar> | 121 <paper-drawer-panel drawer-width="256px" id="panel" narrow="{{isNarrow_}}"> |
63 <div class="title" i18n-content="settings"></div> | 122 <paper-header-panel drawer> |
64 <!-- TODO(dschuyler): implement internal search. --> | 123 <paper-toolbar class="toolbar"> |
65 <iron-icon icon="md-settings-icons:search"></iron-icon> | 124 <div class="heading flex">$i18n{settings}</div> |
66 </paper-toolbar> | 125 </paper-toolbar> |
67 <paper-drawer-panel drawer-width="256px" id="panel"> | 126 <settings-menu current-route="{{currentRoute}}"> |
68 <settings-menu drawer class="flex" current-route="{{currentRoute}}"> | 127 </settings-menu> |
69 </settings-menu> | 128 </paper-header-panel> |
70 <settings-main main prefs="{{prefs}}" current-route="{{currentRoute}}"> | 129 <paper-header-panel main> |
71 <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button> | 130 <paper-toolbar class="toolbar"> |
72 </settings-main> | 131 <paper-icon-button icon="menu" id="menu-button" paper-drawer-toggle> |
| 132 </paper-icon-button> |
| 133 <div class="heading" id="main-title"> |
| 134 $i18n{settings} |
| 135 </div> |
| 136 <div class="last"> |
| 137 <paper-icon-button icon="md-settings-icons:search" toggles> |
| 138 </paper-icon-button> |
| 139 <paper-input id="search-input" label="$i18n{internalSearch}" |
| 140 no-label-float> |
| 141 <!-- TODO(dschuyler): implement internal search. --> |
| 142 <paper-icon-button suffix icon="md-settings-icons:cancel"> |
| 143 </paper-icon-button> |
| 144 </paper-input> |
| 145 </div> |
| 146 </paper-toolbar> |
| 147 <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}"> |
| 148 </paper-icon-button> |
| 149 </paper-header-panel> |
73 </paper-drawer-panel> | 150 </paper-drawer-panel> |
74 </template> | 151 </template> |
75 <script src="settings_ui.js"></script> | 152 <script src="settings_ui.js"></script> |
76 </dom-module> | 153 </dom-module> |
OLD | NEW |