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

Side by Side Diff: chrome/browser/resources/settings/controls/settings_toggle_button.html

Issue 2886603002: [MD settings] separate spacing of controlled-by icon and control-label (Closed)
Patch Set: review changes Created 3 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
OLDNEW
1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> 1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout-classes.html">
5 <link rel="import" href="settings_boolean_control_behavior.html"> 5 <link rel="import" href="settings_boolean_control_behavior.html">
6 <link rel="import" href="../settings_shared_css.html"> 6 <link rel="import" href="../settings_shared_css.html">
7 7
8 <dom-module id="settings-toggle-button"> 8 <dom-module id="settings-toggle-button">
9 <template> 9 <template>
10 <style include="settings-shared iron-flex"> 10 <style include="settings-shared iron-flex">
(...skipping 12 matching lines...) Expand all
23 display: flex; 23 display: flex;
24 min-height: var(--settings-row-two-line-min-height); 24 min-height: var(--settings-row-two-line-min-height);
25 width: 100%; 25 width: 100%;
26 } 26 }
27 27
28 #outerRow[noSubLabel] { 28 #outerRow[noSubLabel] {
29 min-height: var(--settings-row-min-height); 29 min-height: var(--settings-row-min-height);
30 } 30 }
31 31
32 #labelWrapper, 32 #labelWrapper,
33 ::content .more-actions, 33 ::content .more-actions {
34 -webkit-margin-end: var(--settings-control-label-spacing);
35 }
36
34 cr-policy-pref-indicator { 37 cr-policy-pref-indicator {
35 -webkit-margin-end: var(--settings-control-spacing); 38 -webkit-margin-end: var(--settings-controlled-by-spacing);
36 } 39 }
37 </style> 40 </style>
38 <div id="outerRow" noSubLabel$="[[!subLabel]]"> 41 <div id="outerRow" noSubLabel$="[[!subLabel]]">
39 <div class="flex" id="labelWrapper" on-tap="onLabelWrapperTap_" 42 <div class="flex" id="labelWrapper" on-tap="onLabelWrapperTap_"
40 actionable$="[[!controlDisabled_(disabled, pref.*)]]" 43 actionable$="[[!controlDisabled_(disabled, pref.*)]]"
41 hidden="[[!label]]"> 44 hidden="[[!label]]">
42 <div id="label" class="label">[[label]]</div> 45 <div id="label" class="label">[[label]]</div>
43 <div id="subLabel" class="secondary label">[[subLabel]]</div> 46 <div id="subLabel" class="secondary label">[[subLabel]]</div>
44 </div> 47 </div>
45 <content select=".more-actions"></content> 48 <content select=".more-actions"></content>
46 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]"> 49 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]">
47 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]"> 50 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]">
48 </cr-policy-pref-indicator> 51 </cr-policy-pref-indicator>
49 </template> 52 </template>
50 <paper-toggle-button id="control" checked="{{checked}}" 53 <paper-toggle-button id="control" checked="{{checked}}"
51 on-change="notifyChangedByUserInteraction" aria-labelledby="label" 54 on-change="notifyChangedByUserInteraction" aria-labelledby="label"
52 aria-describedby="subLabel" 55 aria-describedby="subLabel"
53 disabled="[[controlDisabled_(disabled, pref)]]"> 56 disabled="[[controlDisabled_(disabled, pref)]]">
54 </paper-toggle-button> 57 </paper-toggle-button>
55 </div> 58 </div>
56 </template> 59 </template>
57 <script src="settings_toggle_button.js"></script> 60 <script src="settings_toggle_button.js"></script>
58 </dom-module> 61 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698