Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1283)

Unified Diff: chrome/browser/resources/settings/controls/controlled_button.html

Issue 2669073002: MD Settings: Allow controlled-button to be used with icons. (Closed)
Patch Set: have the parent row of the controlled-button disable/enable based on controlled-button state Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/browser/resources/settings/controls/controlled_button.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/controls/controlled_button.html
diff --git a/chrome/browser/resources/settings/controls/controlled_button.html b/chrome/browser/resources/settings/controls/controlled_button.html
index 7f4e69d4bded78e4317fee1dea523a7e3220b356..2b36be73057dbe059f00b1224acfbf62d8afaf21 100644
--- a/chrome/browser/resources/settings/controls/controlled_button.html
+++ b/chrome/browser/resources/settings/controls/controlled_button.html
@@ -17,7 +17,7 @@
--justify-margin: 18px;
}
- :host([controlled_]) {
+ :host([controlled]) {
/* Disable pointer events for this whole element, as outer on-tap gets
* triggered when clicking/tapping anywhere in :host. */
pointer-events: none;
@@ -39,9 +39,16 @@
}
</style>
- <paper-button disabled="[[controlled_]]">
- <content></content>
- </paper-button>
+ <template is="dom-if" if="[[iconClass]]">
+ <button is="paper-icon-button-light" disabled="[[controlled]]"
+ actionable class$="{{iconClass}}"></button>
+ </template>
+
+ <template is="dom-if" if="[[!iconClass]]">
+ <paper-button disabled="[[controlled]]">
+ <content></content>
+ </paper-button>
+ </template>
<template is="dom-if" if="[[showIndicator_(pref)]]" restamp>
<cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_">
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/browser/resources/settings/controls/controlled_button.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698