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-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="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-toggle-button"> | 7 <dom-module id="settings-toggle-button"> |
8 <template> | 8 <template> |
9 <style include="settings-shared"> | 9 <style include="settings-shared"> |
10 :host([elide-label]), | 10 :host([elide-label]), |
(...skipping 10 matching lines...) Expand all Loading... | |
21 align-items: center; | 21 align-items: center; |
22 display: flex; | 22 display: flex; |
23 min-height: var(--settings-row-two-line-min-height); | 23 min-height: var(--settings-row-two-line-min-height); |
24 width: 100%; | 24 width: 100%; |
25 } | 25 } |
26 | 26 |
27 #outerRow[noSubLabel] { | 27 #outerRow[noSubLabel] { |
28 min-height: var(--settings-row-min-height); | 28 min-height: var(--settings-row-min-height); |
29 } | 29 } |
30 | 30 |
31 paper-toggle-button, | 31 #labelWrapper, |
32 ::content .more-actions, | |
scottchen
2017/03/10 19:05:46
that's cool, didn't know about ::content.
Dan Beam
2017/03/10 19:14:10
it's probably going away soon, don't get used to i
| |
32 cr-policy-pref-indicator { | 33 cr-policy-pref-indicator { |
33 -webkit-margin-start: var(--checkbox-spacing); | 34 -webkit-margin-end: var(--checkbox-spacing); |
34 } | |
35 | |
36 ::content .more-actions { | |
37 -webkit-margin-end: 10px; | |
38 } | 35 } |
39 </style> | 36 </style> |
40 <div id="outerRow" noSubLabel$="[[!subLabel]]"> | 37 <div id="outerRow" noSubLabel$="[[!subLabel]]"> |
41 <div class="flex" on-tap="onLabelWrapperTap_" | 38 <div class="flex" id="labelWrapper" on-tap="onLabelWrapperTap_" |
42 actionable$="[[!controlDisabled_(disabled, pref.*)]]"> | 39 actionable$="[[!controlDisabled_(disabled, pref.*)]]" |
40 hidden="[[!label]]"> | |
scottchen
2017/03/10 19:05:46
would dom-if be better here?
Dan Beam
2017/03/10 19:14:10
for a couple <div>s, probably not
| |
43 <div id="label" class="label">[[label]]</div> | 41 <div id="label" class="label">[[label]]</div> |
44 <div class="secondary label">[[subLabel]]</div> | 42 <div class="secondary label">[[subLabel]]</div> |
45 </div> | 43 </div> |
46 <content select=".more-actions"></content> | 44 <content select=".more-actions"></content> |
47 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]"> | 45 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]"> |
48 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]"> | 46 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]"> |
49 </cr-policy-pref-indicator> | 47 </cr-policy-pref-indicator> |
50 </template> | 48 </template> |
51 <paper-toggle-button id="control" checked="{{checked}}" | 49 <paper-toggle-button id="control" checked="{{checked}}" |
52 on-change="notifyChangedByUserInteraction" aria-labelledby="label" | 50 on-change="notifyChangedByUserInteraction" aria-labelledby="label" |
53 disabled="[[controlDisabled_(disabled, pref)]]"> | 51 disabled="[[controlDisabled_(disabled, pref)]]"> |
54 </paper-toggle-button> | 52 </paper-toggle-button> |
55 </div> | 53 </div> |
56 </template> | 54 </template> |
57 <script src="settings_toggle_button.js"></script> | 55 <script src="settings_toggle_button.js"></script> |
58 </dom-module> | 56 </dom-module> |
OLD | NEW |