Commit e2311a2b authored by dschuyler's avatar dschuyler Committed by Commit bot

[MD settings] change height and width of checkboxes

This CL makes settings-checkboxes change to a two-line height if the
secondary text is set. The width of the checkbox is expanded to fill
more of the row. A couple instances of .two-line used around a
settings-checkbox have been removed.

BUG=634172
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2226963002
Cr-Commit-Position: refs/heads/master@{#410827}
parent 2599ba38
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</div> </div>
</template> </template>
</div> </div>
<div class="settings-box two-line" <div class="settings-box"
hidden="[[!pageVisibility.homeButton]]"> hidden="[[!pageVisibility.homeButton]]">
<settings-checkbox class="start" label="$i18n{showHomeButton}" <settings-checkbox class="start" label="$i18n{showHomeButton}"
sub-label="[[getShowHomeSubLabel_(prefs.homepage_is_newtabpage.value, prefs.homepage.value)]]" sub-label="[[getShowHomeSubLabel_(prefs.homepage_is_newtabpage.value, prefs.homepage.value)]]"
......
...@@ -10,9 +10,14 @@ ...@@ -10,9 +10,14 @@
<link rel="import" type="css" href="chrome://resources/cr_elements/shared.css"> <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
:host { #outerRow {
align-items: center; align-items: center;
display: flex; display: flex;
min-height: var(--settings-row-two-line-min-height);
width: 100%;
}
#outerRow[noSubLabel] {
min-height: var(--settings-row-min-height); min-height: var(--settings-row-min-height);
} }
...@@ -20,6 +25,10 @@ ...@@ -20,6 +25,10 @@
@apply(--settings-secondary); @apply(--settings-secondary);
} }
paper-checkbox:not([disabled]) {
width: 100%;
}
paper-checkbox:not([checked]) .secondary { paper-checkbox:not([checked]) .secondary {
@apply(--settings-secondary-unchecked); @apply(--settings-secondary-unchecked);
} }
...@@ -30,7 +39,7 @@ ...@@ -30,7 +39,7 @@
</style> </style>
<cr-events id="events"></cr-events> <cr-events id="events"></cr-events>
<div class="layout horizontal center"> <div id="outerRow" noSubLabel$="[[!subLabel]]">
<paper-checkbox id="checkbox" checked="{{checked}}" <paper-checkbox id="checkbox" checked="{{checked}}"
disabled="[[checkboxDisabled_(disabled, pref)]]"> disabled="[[checkboxDisabled_(disabled, pref)]]">
<div>[[label]]</div> <div>[[label]]</div>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</settings-dropdown-menu> </settings-dropdown-menu>
</div> </div>
</template> </template>
<div class="settings-box two-line"> <div class="settings-box">
<settings-checkbox <settings-checkbox
pref="{{prefs.settings.language.send_function_keys}}" pref="{{prefs.settings.language.send_function_keys}}"
label="$i18n{keyboardSendFunctionKeys}" label="$i18n{keyboardSendFunctionKeys}"
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
/* A row with two lines of text. Often the lower line will be .secondary. /* A row with two lines of text. Often the lower line will be .secondary.
*/ */
.settings-box.two-line { .settings-box.two-line {
min-height: 56px; min-height: var(--settings-row-two-line-min-height);
} }
/* /*
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
--settings-page-vertical-margin: 21px; --settings-page-vertical-margin: 21px;
--settings-row-min-height: 44px; --settings-row-min-height: 44px;
--settings-row-two-line-min-height: 56px;
--settings-separator-line: var(--cr-separator-line); --settings-separator-line: var(--cr-separator-line);
--settings-title-bar-background-color: var(--google-blue-700); --settings-title-bar-background-color: var(--google-blue-700);
......
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