| 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-toggle-button/pap
er-toggle-button.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> |
| 3 <link rel="import" href="/controls/settings_boolean_control_behavior.html"> | 3 <link rel="import" href="/controls/settings_boolean_control_behavior.html"> |
| 4 <link rel="import" href="/settings_shared_css.html"> | 4 <link rel="import" href="/settings_shared_css.html"> |
| 5 | 5 |
| 6 <dom-module id="settings-toggle-button"> | 6 <dom-module id="settings-toggle-button"> |
| 7 <template> | 7 <template> |
| 8 <style include="settings-shared"> | 8 <style include="settings-shared"> |
| 9 #outerRow { | 9 #outerRow { |
| 10 align-items: center; | 10 align-items: center; |
| 11 display: flex; | 11 display: flex; |
| 12 min-height: var(--settings-row-two-line-min-height); | 12 min-height: var(--settings-row-two-line-min-height); |
| 13 width: 100%; | 13 width: 100%; |
| 14 } | 14 } |
| 15 | 15 |
| 16 #outerRow[noSubLabel] { | 16 #outerRow[noSubLabel] { |
| 17 min-height: var(--settings-row-min-height); | 17 min-height: var(--settings-row-min-height); |
| 18 } | 18 } |
| 19 | 19 |
| 20 paper-toggle-button:not([checked]) .secondary { | 20 paper-toggle-button:not([checked]) .secondary { |
| 21 @apply(--settings-secondary-unchecked); | 21 @apply(--settings-secondary-unchecked); |
| 22 } | 22 } |
| 23 | 23 |
| 24 cr-policy-pref-indicator { | 24 cr-policy-pref-indicator { |
| 25 -webkit-margin-end: var(--checkbox-spacing); | 25 -webkit-margin-end: var(--checkbox-spacing); |
| 26 } | 26 } |
| 27 </style> | 27 </style> |
| 28 <div id="outerRow" noSubLabel$="[[!subLabel]]"> | 28 <div id="outerRow" noSubLabel$="[[!subLabel]]"> |
| 29 <div class="flex"> | 29 <div class="flex" on-tap="onLabelWrapperTap_" |
| 30 actionable$="[[!controlDisabled_(disabled, pref)]]"> |
| 30 <div>[[label]]</div> | 31 <div>[[label]]</div> |
| 31 <div class="secondary">[[subLabel]]</div> | 32 <div class="secondary">[[subLabel]]</div> |
| 32 </div> | 33 </div> |
| 33 <template is="dom-if" if="[[pref.controlledBy]]"> | 34 <template is="dom-if" if="[[pref.controlledBy]]"> |
| 34 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> | 35 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> |
| 35 </template> | 36 </template> |
| 36 <paper-toggle-button id="control" checked="{{checked}}" | 37 <paper-toggle-button id="control" checked="{{checked}}" |
| 37 disabled="[[controlDisabled_(disabled, pref)]]"> | 38 disabled="[[controlDisabled_(disabled, pref)]]"> |
| 38 </paper-toggle-button> | 39 </paper-toggle-button> |
| 39 </div> | 40 </div> |
| 40 </template> | 41 </template> |
| 41 <script src="settings_toggle_button.js"></script> | 42 <script src="settings_toggle_button.js"></script> |
| 42 </dom-module> | 43 </dom-module> |
| OLD | NEW |