| 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-checkbox/paper-ch
eckbox.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be
havior.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be
havior.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> | 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> |
| 5 <link rel="import" href="/controls/pref_control_behavior.html"> | 5 <link rel="import" href="/controls/pref_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-checkbox"> | 8 <dom-module id="settings-checkbox"> |
| 9 <template> | 9 <template> |
| 10 <style include="settings-shared"> | 10 <style include="settings-shared"> |
| 11 #outerRow { | 11 #outerRow { |
| 12 align-items: center; | 12 align-items: center; |
| 13 display: flex; | 13 display: flex; |
| 14 min-height: var(--settings-row-two-line-min-height); | 14 min-height: var(--settings-row-two-line-min-height); |
| 15 width: 100%; | 15 width: 100%; |
| 16 } | 16 } |
| 17 | 17 |
| 18 #outerRow[noSubLabel] { | 18 #outerRow[noSubLabel] { |
| 19 min-height: var(--settings-row-min-height); | 19 min-height: var(--settings-row-min-height); |
| 20 } | 20 } |
| 21 | 21 |
| 22 .secondary:not(:empty) { | |
| 23 @apply(--settings-secondary); | |
| 24 } | |
| 25 | |
| 26 paper-checkbox:not([disabled]) { | 22 paper-checkbox:not([disabled]) { |
| 27 width: 100%; | 23 width: 100%; |
| 28 } | 24 } |
| 29 | 25 |
| 30 paper-checkbox:not([checked]) .secondary { | 26 paper-checkbox:not([checked]) .secondary { |
| 31 @apply(--settings-secondary-unchecked); | 27 @apply(--settings-secondary-unchecked); |
| 32 } | 28 } |
| 33 | 29 |
| 34 cr-policy-pref-indicator { | 30 cr-policy-pref-indicator { |
| 35 -webkit-margin-start: var(--checkbox-spacing); | 31 -webkit-margin-start: var(--checkbox-spacing); |
| 36 } | 32 } |
| 37 </style> | 33 </style> |
| 38 <div id="outerRow" noSubLabel$="[[!subLabel]]"> | 34 <div id="outerRow" noSubLabel$="[[!subLabel]]"> |
| 39 <paper-checkbox id="checkbox" checked="{{checked}}" | 35 <paper-checkbox id="checkbox" checked="{{checked}}" |
| 40 disabled="[[checkboxDisabled_(disabled, pref)]]"> | 36 disabled="[[checkboxDisabled_(disabled, pref)]]"> |
| 41 <div>[[label]]</div> | 37 <div>[[label]]</div> |
| 42 <div class="secondary">[[subLabel]]</div> | 38 <div class="secondary">[[subLabel]]</div> |
| 43 </paper-checkbox> | 39 </paper-checkbox> |
| 44 <template is="dom-if" if="[[pref.policySource]]"> | 40 <template is="dom-if" if="[[pref.policySource]]"> |
| 45 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> | 41 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> |
| 46 </template> | 42 </template> |
| 47 </div> | 43 </div> |
| 48 </template> | 44 </template> |
| 49 <script src="settings_checkbox.js"></script> | 45 <script src="settings_checkbox.js"></script> |
| 50 </dom-module> | 46 </dom-module> |
| OLD | NEW |