Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 1939373002: MD Settings: make the background color of the collapsed nav drawer white (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoping + flex-shrink Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
11 * <settings-ui prefs="{{prefs}}"></settings-ui> 11 * <settings-ui prefs="{{prefs}}"></settings-ui>
12 */ 12 */
13 Polymer({ 13 Polymer({
14 is: 'settings-ui', 14 is: 'settings-ui',
15 15
16 properties: { 16 properties: {
17 /** 17 /**
18 * Preferences state. 18 * Preferences state.
19 * @type {?CrSettingsPrefsElement} 19 * @type {?CrSettingsPrefsElement}
20 */ 20 */
21 prefs: Object, 21 prefs: Object,
22 22
23 /** @type {?settings.DirectionDelegate} */ 23 /** @type {?settings.DirectionDelegate} */
24 directionDelegate: { 24 directionDelegate: {
25 observer: 'directionDelegateChanged_', 25 observer: 'directionDelegateChanged_',
26 type: Object, 26 type: Object,
27 }, 27 },
28 }, 28 },
29 29
30 listeners: {
31 'iron-select': 'onIronSelect_',
32 'paper-responsive-change': 'onPaperResponsiveChange_',
33 },
34
35 /**
36 * @param {!CustomEvent} e
37 * @private
38 */
39 onIronSelect_: function(e) {
40 if (Polymer.dom(e).path.indexOf(this.$.panel) >= 0)
41 this.classList.remove('narrowing');
42 },
43
44 /**
45 * @param {!CustomEvent} e
46 * @private
47 */
48 onPaperResponsiveChange_: function(e) {
49 if (Polymer.dom(e).rootTarget == this.$.panel)
50 this.classList.toggle('narrowing', e.detail.narrow);
51 },
52
30 /** @private */ 53 /** @private */
31 directionDelegateChanged_: function() { 54 directionDelegateChanged_: function() {
32 this.$.panel.rightDrawer = this.directionDelegate.isRtl(); 55 this.$.panel.rightDrawer = this.directionDelegate.isRtl();
33 }, 56 },
34 }); 57 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698