OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | |
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <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"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-drawer-panel/pape r-drawer-panel.html"> |
4 <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"> | 5 <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"> | 6 <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"> | 7 <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"> | 8 <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"> | 9 <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"> | 10 <link rel="import" href="chrome://md-settings/direction_delegate.html"> |
10 <link rel="import" href="chrome://md-settings/i18n_setup.html"> | 11 <link rel="import" href="chrome://md-settings/i18n_setup.html"> |
11 <link rel="import" href="chrome://md-settings/icons.html"> | 12 <link rel="import" href="chrome://md-settings/icons.html"> |
12 <link rel="import" href="chrome://md-settings/settings_main/settings_main.html"> | 13 <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"> | 14 <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 "> | 15 <link rel="import" href="chrome://md-settings/settings_page/settings_router.html "> |
15 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> | 16 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> |
16 | 17 |
17 <dom-module id="settings-ui"> | 18 <dom-module id="settings-ui"> |
18 <template> | 19 <template> |
19 <style include="settings-shared"> | 20 <style include="settings-shared"> |
20 :host { | 21 :host { |
21 @apply(--layout-vertical); | 22 @apply(--layout-vertical); |
22 @apply(--layout-fit); | 23 @apply(--layout-fit); |
23 -webkit-user-select: none; | 24 -webkit-user-select: none; |
24 background-color: var(--settings-background-color); | 25 background-color: var(--settings-background-color); |
25 } | 26 } |
26 | 27 |
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 { | 28 paper-drawer-panel { |
43 @apply(--layout-center); | 29 @apply(--layout-center); |
44 --paper-drawer-panel-left-drawer-container: { | 30 --paper-drawer-panel-left-drawer-container: { |
45 background-color: var(--settings-background-color); | 31 background-color: var(--settings-background-color); |
46 margin-top: 8px; | |
47 }; | 32 }; |
48 --paper-drawer-panel-right-drawer-container: { | 33 --paper-drawer-panel-right-drawer-container: { |
49 background-color: var(--settings-background-color); | 34 background-color: var(--settings-background-color); |
50 margin-top: 8px; | |
51 }; | 35 }; |
52 position: relative; | 36 position: relative; |
53 } | 37 } |
54 | 38 |
55 settings-main paper-icon-button { | 39 paper-icon-button { |
56 z-index: 10; | 40 --iron-icon-fill-color: var(--settings-title-bar-color); |
41 } | |
42 | |
43 paper-icon-button[suffix] { | |
44 --iron-icon-fill-color: var(--settings-title-search-color); | |
45 line-height: 16px !important; | |
46 height: 32px; /* After padding, the icon size is 16px. */ | |
47 width: 32px; | |
48 } | |
49 | |
50 paper-input { | |
51 @apply(--layout-center); | |
52 --paper-input-container: { | |
53 padding-top: 0; | |
54 }; | |
55 --paper-input-container-color: var(--settings-title-search-color); | |
56 --paper-input-container-focus-color: var(--settings-title-search-color); | |
57 --paper-input-container-input: { | |
58 font-size: 81.25%; /* go to 13px from 16px */ | |
59 line-height: 16px !important; | |
60 }; | |
61 --paper-input-container-input-color: var(--settings-title-bar-color); | |
62 --paper-input-container-label: { | |
63 font-size: 81.25%; /* go to 13px from 16px */ | |
64 }; | |
65 --paper-input-max-width: 200px; | |
66 } | |
67 | |
68 paper-toolbar { | |
69 --paper-toolbar-height: 56px; | |
70 --paper-toolbar-sm-height: 56px; | |
71 --paper-toolbar-content: { | |
72 font-size: 123.08%; /* go to 16px from 13px */ | |
73 } | |
74 --paper-toolbar: { | |
75 background-color: var(--settings-title-bar-background-color); | |
76 }; | |
77 } | |
78 | |
79 /* Prevent paper-toolbar from setting the margin-right to 24px. */ | |
80 paper-toolbar.toolbar > paper-icon-button[icon=menu][paper-drawer-toggle] { | |
81 margin-right: 0; | |
82 } | |
83 | |
84 .heading { | |
85 -webkit-margin-start: 8px; | |
86 } | |
87 | |
88 .last { | |
89 display: flex; | |
90 justify-content: flex-end; | |
91 width: 100%; | |
57 } | 92 } |
58 </style> | 93 </style> |
59 <settings-router current-route="{{currentRoute}}" | 94 <settings-router current-route="{{currentRoute}}" |
60 current-route-titles="{{currentRouteTitles}}"> | 95 current-route-titles="{{currentRouteTitles}}"> |
61 </settings-router> | 96 </settings-router> |
62 <paper-toolbar> | 97 <paper-drawer-panel drawer-width="256px" id="panel" narrow="{{isNarrow_}}"> |
63 <div class="title" i18n-content="settings"></div> | 98 <paper-header-panel drawer> |
64 <!-- TODO(dschuyler): implement internal search. --> | 99 <paper-toolbar class="toolbar"> |
65 <iron-icon icon="md-settings-icons:search"></iron-icon> | 100 <div class="heading flex">$i18n{settings}</div> |
66 </paper-toolbar> | 101 </paper-toolbar> |
67 <paper-drawer-panel drawer-width="256px" id="panel"> | 102 <settings-menu current-route="{{currentRoute}}"> |
68 <settings-menu drawer class="flex" current-route="{{currentRoute}}"> | 103 </settings-menu> |
69 </settings-menu> | 104 </paper-header-panel> |
70 <settings-main main prefs="{{prefs}}" current-route="{{currentRoute}}"> | 105 <paper-header-panel main> |
71 <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button> | 106 <paper-toolbar class="toolbar"> |
72 </settings-main> | 107 <paper-icon-button icon="menu" paper-drawer-toggle> |
108 </paper-icon-button> | |
109 <div class="heading" hidden$="[[!isNarrow_]]"> | |
tommycli
2016/04/13 22:35:28
Instead of a data binding, does a CSS rule like th
dschuyler
2016/04/14 21:27:22
Done.
| |
110 $i18n{settings} | |
111 </div> | |
112 <div class="last"> | |
113 <paper-icon-button icon="md-settings-icons:search" toggles | |
114 active="{{isSearchActive_}}"></paper-icon-button> | |
tommycli
2016/04/13 22:35:28
Same here, can we use a CSS rule instead like...
dschuyler
2016/04/14 21:27:22
Done.
| |
115 <template is="dom-if" if="[[isSearchActive_]]"> | |
116 <paper-input label="$i18n{internalSearch}" no-label-float> | |
117 <!-- TODO(dschuyler): implement internal search. --> | |
118 <paper-icon-button suffix icon="md-settings-icons:cancel"> | |
119 </paper-icon-button> | |
120 </paper-input> | |
121 </template> | |
122 </div> | |
123 </paper-toolbar> | |
124 <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}"> | |
125 </paper-icon-button> | |
126 </paper-header-panel> | |
73 </paper-drawer-panel> | 127 </paper-drawer-panel> |
74 </template> | 128 </template> |
75 <script src="settings_ui.js"></script> | 129 <script src="settings_ui.js"></script> |
76 </dom-module> | 130 </dom-module> |
OLD | NEW |