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