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="/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-checkbox"> | 6 <dom-module id="settings-checkbox"> |
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-checkbox:not([disabled]) { | 20 paper-checkbox { |
21 width: 100%; | 21 width: 100%; |
22 } | 22 } |
23 | 23 |
24 paper-checkbox:not([checked]) .secondary { | 24 paper-checkbox:not([checked]) .secondary { |
25 @apply(--settings-secondary-unchecked); | 25 @apply(--settings-secondary-unchecked); |
26 } | 26 } |
27 | 27 |
28 cr-policy-pref-indicator { | 28 cr-policy-pref-indicator { |
29 -webkit-margin-start: var(--checkbox-spacing); | 29 -webkit-margin-start: var(--checkbox-spacing); |
30 } | 30 } |
31 </style> | 31 </style> |
32 <div id="outerRow" noSubLabel$="[[!subLabel]]"> | 32 <div id="outerRow" noSubLabel$="[[!subLabel]]"> |
33 <paper-checkbox id="checkbox" checked="{{checked}}" | 33 <paper-checkbox id="checkbox" checked="{{checked}}" |
34 disabled="[[controlDisabled_(disabled, pref)]]"> | 34 disabled="[[controlDisabled_(disabled, pref)]]"> |
35 <div>[[label]] <content></content></div> | 35 <div>[[label]] <content></content></div> |
36 <div class="secondary">[[subLabel]]</div> | 36 <div class="secondary">[[subLabel]]</div> |
37 </paper-checkbox> | 37 </paper-checkbox> |
38 <template is="dom-if" if="[[pref.controlledBy]]"> | 38 <template is="dom-if" if="[[pref.controlledBy]]"> |
39 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> | 39 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> |
40 </template> | 40 </template> |
41 </div> | 41 </div> |
42 </template> | 42 </template> |
43 <script src="settings_checkbox.js"></script> | 43 <script src="settings_checkbox.js"></script> |
44 </dom-module> | 44 </dom-module> |
OLD | NEW |