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 /* | |
tommycli
2016/04/15 00:15:15
nit: \n needed before this line
dschuyler
2016/04/15 00:49:15
Done.
| |
61 * The button in the input suffix needs special positioning for the UX | |
62 * design. The hit box extends right and down from the paper-input | |
63 * underline. | |
64 */ | |
65 --paper-input-suffix: { | |
66 left: 8px; | |
67 line-height: 16px; | |
68 position: relative; | |
69 top: 4px; | |
70 }; | |
71 --paper-input-container-input-color: var(--settings-title-bar-color); | |
72 --paper-input-container-label: { | |
73 font-size: 81.25%; /* go to 13px from 16px */ | |
74 top: 3px; /* Special positioning needed for UX design. */ | |
75 }; | |
76 --paper-input-max-width: 200px; | |
77 } | |
78 | |
79 paper-toolbar { | |
80 --paper-toolbar-height: 56px; | |
81 --paper-toolbar-sm-height: 56px; | |
82 --paper-toolbar-content: { | |
83 font-size: 123.08%; /* go to 16px from 13px */ | |
84 } | |
85 --paper-toolbar: { | |
86 background-color: var(--settings-title-bar-background-color); | |
87 }; | |
88 } | |
89 | |
90 /* Prevent paper-toolbar from setting the margin-right to 24px. */ | |
91 paper-icon-button#menu-button { | |
92 /* | |
93 * TODO(dschuyler): this margin is on the right regardless of language | |
94 * direction (e.g. rtl). Make a patch for paper-toolbar in Polymer. | |
95 */ | |
96 margin-right: 0; | |
97 } | |
98 | |
99 .heading { | |
100 -webkit-margin-start: 8px; | |
101 } | |
102 | |
103 paper-drawer-panel:not([narrow]) #main-title { | |
tommycli
2016/04/15 00:15:15
Wow, this is cool! This will make it super fast.
dschuyler
2016/04/15 00:49:15
Acknowledged.
| |
104 display: none; | |
105 } | |
106 | |
107 paper-icon-button[toggles]:not([active]) + #search-input { | |
108 display: none; | |
109 } | |
110 | |
111 .last { | |
112 display: flex; | |
113 justify-content: flex-end; | |
114 width: 100%; | |
57 } | 115 } |
58 </style> | 116 </style> |
59 <settings-router current-route="{{currentRoute}}" | 117 <settings-router current-route="{{currentRoute}}" |
60 current-route-titles="{{currentRouteTitles}}"> | 118 current-route-titles="{{currentRouteTitles}}"> |
61 </settings-router> | 119 </settings-router> |
62 <paper-toolbar> | 120 <paper-drawer-panel drawer-width="256px" id="panel" narrow="{{isNarrow_}}"> |
63 <div class="title" i18n-content="settings"></div> | 121 <paper-header-panel drawer> |
64 <!-- TODO(dschuyler): implement internal search. --> | 122 <paper-toolbar class="toolbar"> |
65 <iron-icon icon="md-settings-icons:search"></iron-icon> | 123 <div class="heading flex">$i18n{settings}</div> |
66 </paper-toolbar> | 124 </paper-toolbar> |
67 <paper-drawer-panel drawer-width="256px" id="panel"> | 125 <settings-menu current-route="{{currentRoute}}"> |
68 <settings-menu drawer class="flex" current-route="{{currentRoute}}"> | 126 </settings-menu> |
69 </settings-menu> | 127 </paper-header-panel> |
70 <settings-main main prefs="{{prefs}}" current-route="{{currentRoute}}"> | 128 <paper-header-panel main> |
71 <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button> | 129 <paper-toolbar class="toolbar"> |
72 </settings-main> | 130 <paper-icon-button icon="menu" id="menu-button" paper-drawer-toggle> |
131 </paper-icon-button> | |
132 <div class="heading" id="main-title"> | |
133 $i18n{settings} | |
134 </div> | |
135 <div class="last"> | |
136 <paper-icon-button icon="md-settings-icons:search" toggles> | |
137 </paper-icon-button> | |
138 <paper-input id="search-input" label="$i18n{internalSearch}" | |
139 no-label-float> | |
140 <!-- TODO(dschuyler): implement internal search. --> | |
141 <paper-icon-button suffix icon="md-settings-icons:cancel"> | |
142 </paper-icon-button> | |
143 </paper-input> | |
144 </div> | |
145 </paper-toolbar> | |
146 <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}"> | |
147 </paper-icon-button> | |
148 </paper-header-panel> | |
73 </paper-drawer-panel> | 149 </paper-drawer-panel> |
74 </template> | 150 </template> |
75 <script src="settings_ui.js"></script> | 151 <script src="settings_ui.js"></script> |
76 </dom-module> | 152 </dom-module> |
OLD | NEW |