Commit 942e5f49 authored by sauski's avatar sauski Committed by Commit Bot

Content Settings Redesign: Adjust height on multi-line radio buttons

Increase minimum height for radio buttons on redesigned content
settings pages to the standard two-line height if they have a sub label.

Bug: 1113642
Change-Id: I7ed293a967f21c332a86aa292bb741e4ab149f98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2487289
Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: default avatarSean Harrison <harrisonsean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819332}
parent aeb46734
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
--settings-collapse-toggle-min-height: var(--settings-row-min-height); --settings-collapse-toggle-min-height: var(--settings-row-min-height);
} }
settings-collapse-radio-button.two-line {
--settings-collapse-toggle-min-height:
var(--settings-row-two-line-min-height);
}
settings-collapse-radio-button:not(:first-of-type) { settings-collapse-radio-button:not(:first-of-type) {
--settings-collapse-separator-line: var(--cr-separator-line); --settings-collapse-separator-line: var(--cr-separator-line);
} }
...@@ -565,7 +570,7 @@ ...@@ -565,7 +570,7 @@
</settings-collapse-radio-button> </settings-collapse-radio-button>
<template is="dom-if" <template is="dom-if"
if="[[enableQuietNotificationPromptsSetting_]]"> if="[[enableQuietNotificationPromptsSetting_]]">
<settings-collapse-radio-button no-collapse <settings-collapse-radio-button no-collapse class="two-line"
name="[[notificationSettingEnum_.QUIETER_MESSAGING]]" name="[[notificationSettingEnum_.QUIETER_MESSAGING]]"
pref="[[prefs.generated.notification]]" pref="[[prefs.generated.notification]]"
label="$i18n{siteSettingsNotificationsAllowed}" label="$i18n{siteSettingsNotificationsAllowed}"
...@@ -573,7 +578,7 @@ ...@@ -573,7 +578,7 @@
icon="settings:notifications"> icon="settings:notifications">
</settings-collapse-radio-button> </settings-collapse-radio-button>
</template> </template>
<settings-collapse-radio-button no-collapse <settings-collapse-radio-button no-collapse class="two-line"
name="[[notificationSettingEnum_.BLOCK]]" name="[[notificationSettingEnum_.BLOCK]]"
pref="[[prefs.generated.notification]]" pref="[[prefs.generated.notification]]"
label="$i18n{siteSettingsNotificationsBlocked}" label="$i18n{siteSettingsNotificationsBlocked}"
......
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
--settings-collapse-toggle-min-height: var(--settings-row-min-height); --settings-collapse-toggle-min-height: var(--settings-row-min-height);
} }
settings-collapse-radio-button.two-line {
--settings-collapse-toggle-min-height:
var(--settings-row-two-line-min-height);
}
settings-collapse-radio-button:not(:first-of-type) { settings-collapse-radio-button:not(:first-of-type) {
--settings-collapse-separator-line: var(--cr-separator-line); --settings-collapse-separator-line: var(--cr-separator-line);
} }
...@@ -28,6 +33,7 @@ ...@@ -28,6 +33,7 @@
on-change="onSelectedChanged_"> on-change="onSelectedChanged_">
<settings-collapse-radio-button <settings-collapse-radio-button
id="enabledRadioOption" id="enabledRadioOption"
class$="[[getEnabledButtonClass_(allowOptionSubLabel)]]"
name="[[siteContentRadioSettingEnum_.ENABLED]]" name="[[siteContentRadioSettingEnum_.ENABLED]]"
pref="[[pref_]]" pref="[[pref_]]"
label="[[allowOptionLabel]]" label="[[allowOptionLabel]]"
...@@ -38,6 +44,7 @@ ...@@ -38,6 +44,7 @@
</settings-collapse-radio-button> </settings-collapse-radio-button>
<settings-collapse-radio-button <settings-collapse-radio-button
id="disabledRadioOption" id="disabledRadioOption"
class$="[[getDisabledButtonClass_(blockOptionSubLabel)]]"
name="[[siteContentRadioSettingEnum_.DISABLED]]" name="[[siteContentRadioSettingEnum_.DISABLED]]"
pref="[[pref_]]" pref="[[pref_]]"
label="[[blockOptionLabel]]" label="[[blockOptionLabel]]"
......
...@@ -122,6 +122,22 @@ Polymer({ ...@@ -122,6 +122,22 @@ Polymer({
} }
}, },
/**
* @return {string}
* @private
*/
getEnabledButtonClass_() {
return this.allowOptionSubLabel ? 'two-line' : '';
},
/**
* @return {string}
* @private
*/
getDisabledButtonClass_() {
return this.blockOptionSubLabel ? 'two-line' : '';
},
/** /**
* A handler for changing the default permission value for a content type. * A handler for changing the default permission value for a content type.
* This is also called during page setup after we get the default state. * This is also called during page setup after we get the default state.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment