| Index: chrome/browser/resources/settings/settings_ui/settings_ui.html
|
| diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.html b/chrome/browser/resources/settings/settings_ui/settings_ui.html
|
| index 9a4a37282297357ab2fc9c16d92105a9f2ba3009..7d71817b00f91d88fcd9e7011b75db5fc9efbbdf 100644
|
| --- a/chrome/browser/resources/settings/settings_ui/settings_ui.html
|
| +++ b/chrome/browser/resources/settings/settings_ui/settings_ui.html
|
| @@ -1,12 +1,11 @@
|
| <link rel="import" href="chrome://resources/cr_elements/icons.html">
|
| <link rel="import" href="chrome://resources/html/polymer.html">
|
| -<link rel="import" href="chrome://resources/polymer/v1_0/paper-drawer-panel/paper-drawer-panel.html">
|
| +<link rel="import" href="chrome://resources/polymer/v1_0/app-layout/app-drawer/app-drawer.html">
|
| +<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/iron-icon/iron-icon.html">
|
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-header-panel/paper-header-panel.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/paper-input/paper-input.html">
|
| -<link rel="import" href="chrome://resources/polymer/v1_0/paper-toolbar/paper-toolbar.html">
|
| -<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
|
| -<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
|
| <link rel="import" href="/direction_delegate.html">
|
| <link rel="import" href="/i18n_setup.html">
|
| <link rel="import" href="/icons.html">
|
| @@ -26,18 +25,6 @@
|
| flex-direction: column;
|
| }
|
|
|
| - paper-drawer-panel {
|
| - --paper-drawer-panel-drawer-container: {
|
| - background: none; /* Remove default background styling. */
|
| - };
|
| - align-items: center;
|
| - position: relative;
|
| - }
|
| -
|
| - paper-header-panel[main] paper-icon-button {
|
| - --iron-icon-fill-color: var(--settings-title-bar-color);
|
| - }
|
| -
|
| paper-icon-button[suffix] {
|
| --iron-icon-fill-color: var(--settings-title-search-color);
|
| height: 32px; /* After padding, the icon size is 16px. */
|
| @@ -77,61 +64,17 @@
|
| align-items: center;
|
| }
|
|
|
| - /* These header elements must create stacking contexts when a section is
|
| - * expanding to show a sub-page. (It's simpler for them to always create
|
| - * these stacking contexts, so we do.) But for the overlay to work, the
|
| - * paper-header-panel's other descendents (rooted at settings-main) must
|
| - * never create stacking contexts while a dialog is showing. This means
|
| - * we cannot animate a section expanding/collapsing while a dialog is
|
| - * shown (which makes good UX sense anyway.) I have discovered a truly
|
| - * non-marvellous proof of this, which this comment cannot contain:
|
| - * https://goo.gl/CCzijE */
|
| - paper-header-panel[main] paper-toolbar {
|
| - z-index: 2;
|
| - }
|
|
|
| - paper-header-panel[main] {
|
| + paper-header-panel {
|
| --paper-header-panel-shadow: {
|
| z-index: 2;
|
| };
|
| }
|
|
|
| - /* The paper-drawer-panel implementation gives the drawer a stacking
|
| - * context, so its z-index should at least equal the main panel's. */
|
| - paper-drawer-panel[narrow] {
|
| - --paper-drawer-panel-drawer-container: {
|
| - z-index: 2;
|
| - };
|
| - }
|
| -
|
| - paper-toolbar {
|
| - --paper-toolbar-height: 56px;
|
| - --paper-toolbar-sm-height: 56px;
|
| - --paper-toolbar-content: {
|
| - font-size: 123.08%; /* go to 16px from 13px */
|
| - };
|
| - --paper-toolbar: {
|
| - background-color: var(--settings-title-bar-background-color);
|
| - };
|
| - }
|
| -
|
| - paper-icon-button#menu-button {
|
| - /* Prevent the menu icon from changing size with the window size. */
|
| - flex-shrink: 0;
|
| - /* Prevent paper-toolbar from setting the margin-right to 24px.
|
| - * TODO(dschuyler): this margin is on the right regardless of language
|
| - * direction (e.g. rtl). Make a patch for paper-toolbar in Polymer. */
|
| - margin-right: 0;
|
| - }
|
| -
|
| .heading {
|
| -webkit-margin-start: 8px;
|
| }
|
|
|
| - paper-drawer-panel:not([narrow]) #main-title {
|
| - display: none;
|
| - }
|
| -
|
| paper-icon-button[toggles]:not([active]) + #search-input {
|
| display: none;
|
| }
|
| @@ -150,40 +93,69 @@
|
| justify-content: flex-end;
|
| width: 100%;
|
| }
|
| +
|
| + app-drawer {
|
| + z-index: 1;
|
| + }
|
| +
|
| + .toolbar,
|
| + app-drawer .drawer-header {
|
| + align-items: center;
|
| + display: flex;
|
| + font-size: 123.08%; /* go to 16px from 13px */
|
| + min-height: 56px;
|
| + }
|
| +
|
| + .toolbar {
|
| + background-color: var(--settings-title-bar-background-color);
|
| + color: white;
|
| + padding: 0 16px;
|
| + }
|
| +
|
| + .toolbar paper-icon-button {
|
| + --iron-icon-fill-color: white;
|
| + }
|
| +
|
| + app-drawer .drawer-header {
|
| + -webkit-padding-start: 24px;
|
| + border-bottom: var(--settings-separator-line);
|
| + }
|
| +
|
| + app-drawer .drawer-content {
|
| + height: calc(100% - 56px);
|
| + overflow: auto;
|
| + }
|
| </style>
|
| <settings-router current-route="{{currentRoute}}"
|
| current-route-titles="{{currentRouteTitles}}">
|
| </settings-router>
|
| - <paper-drawer-panel drawer-width="256px" id="panel" narrow="{{isNarrow_}}"
|
| - responsive-width="900px" force-narrow>
|
| - <paper-header-panel mode="waterfall" drawer>
|
| - <div class="paper-header">$i18n{settings}</div>
|
| + <div class="toolbar">
|
| + <paper-icon-button icon="settings:menu" on-tap="onMenuButtonTap_">
|
| + </paper-icon-button>
|
| + <div class="heading flex">$i18n{settings}</div>
|
| + <div class="last">
|
| + <paper-icon-button icon="cr:search" toggles></paper-icon-button>
|
| + <paper-input id="search-input" label="$i18n{internalSearch}"
|
| + no-label-float>
|
| + <!-- TODO(dschuyler): implement internal search. -->
|
| + <paper-icon-button suffix icon="cr:cancel">
|
| + </paper-icon-button>
|
| + </paper-input>
|
| + </div>
|
| + </div>
|
| + <app-drawer swipe-open>
|
| + <!--TODO(dpapad): Restore waterfall effect or remove this TODO, depending
|
| + on outcome of crbug.com/621718-->
|
| + <div class="drawer-header">$i18n{settings}</div>
|
| + <div class="drawer-content">
|
| <settings-menu current-route="{{currentRoute}}" id="sideNav">
|
| </settings-menu>
|
| - </paper-header-panel>
|
| - <paper-header-panel mode="waterfall" main>
|
| - <paper-toolbar>
|
| - <paper-icon-button icon="settings:menu" id="menu-button"
|
| - paper-drawer-toggle>
|
| - </paper-icon-button>
|
| - <div class="heading" id="main-title">
|
| - $i18n{settings}
|
| - </div>
|
| - <div class="last">
|
| - <paper-icon-button icon="cr:search" toggles>
|
| - </paper-icon-button>
|
| - <paper-input id="search-input" label="$i18n{internalSearch}"
|
| - no-label-float>
|
| - <!-- TODO(dschuyler): implement internal search. -->
|
| - <paper-icon-button suffix icon="cr:cancel">
|
| - </paper-icon-button>
|
| - </paper-input>
|
| - </div>
|
| - </paper-toolbar>
|
| - <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}">
|
| - </settings-main>
|
| - </paper-header-panel>
|
| - </paper-drawer-panel>
|
| + </div>
|
| + </app-drawer>
|
| + <paper-header-panel mode="waterfall">
|
| + <settings-main prefs="{{prefs}}" current-route="{{currentRoute}}">
|
| + </settings-main>
|
| + </paper-header-panel>
|
| </template>
|
| <script src="settings_ui.js"></script>
|
| </dom-module>
|
|
|