Commit d58d3252 authored by stevenjb's avatar stevenjb Committed by Commit bot

MD Settings: Network and bluetooth polish

This CL:
* Fixes button spacing in the network details page.
* Fixes the on/off toggle button font and color for network and
  bluetooth
* Replaces incorrect primary/secondary button classes in dialogs
  with action/cancel-button
* Corrects the blue color for action buttons as per UX
* Converts the "add network" section to list-frame / list-item
  to correct borders and spacing.

BUG=710258,710259,710261
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2846763003
Cr-Commit-Position: refs/heads/master@{#468164}
parent 6fc41c68
...@@ -28,13 +28,17 @@ ...@@ -28,13 +28,17 @@
@apply(--cr-icon-height-width); @apply(--cr-icon-height-width);
} }
#onoff[on] { #onOff {
font-weight: 500;
}
#onOff[on] {
color: var(--settings-toggle-color); color: var(--settings-toggle-color);
} }
</style> </style>
<div class="settings-box first"> <div class="settings-box first">
<div id="onoff" class="start" on$="[[bluetoothToggleState]]"> <div id="onOff" class="start" on$="[[bluetoothToggleState]]">
[[getOnOffString_(bluetoothToggleState, [[getOnOffString_(bluetoothToggleState,
'$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]] '$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]]
</div> </div>
......
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
</div> </div>
</div> </div>
<div class="button-container"> <div class="button-container">
<paper-button id="reset" class="secondary-button" on-tap="onResetTap_"> <paper-button id="reset" class="cancel-button" on-tap="onResetTap_">
$i18n{displayOverscanReset} $i18n{displayOverscanReset}
</paper-button> </paper-button>
<paper-button class="primary-button" on-tap="onSaveTap_"> <paper-button class="action-button" on-tap="onSaveTap_">
$i18n{ok} $i18n{ok}
</paper-button> </paper-button>
</div> </div>
......
...@@ -61,7 +61,12 @@ ...@@ -61,7 +61,12 @@
} }
#buttonDiv paper-button { #buttonDiv paper-button {
margin: 10px 0; /* Align text edge with trailing margin (12px button padding) */
-webkit-margin-end: -12px;
/* 8px spacing between highlight edges. */
-webkit-margin-start: calc(12px + 8px);
margin-bottom: 10px;
margin-top: 10px;
} }
#networkState { #networkState {
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
<dom-module id="settings-internet-page"> <dom-module id="settings-internet-page">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
div.add-no-icon {
-webkit-margin-start: 36px
}
iron-icon { iron-icon {
-webkit-margin-end: 12px; -webkit-margin-end: 12px;
-webkit-margin-start: 4px; -webkit-margin-start: 4px;
...@@ -48,30 +44,32 @@ ...@@ -48,30 +44,32 @@
</cr-expand-button> </cr-expand-button>
</div> </div>
<template is="dom-if" if="[[addConnectionExpanded_]]"> <template is="dom-if" if="[[addConnectionExpanded_]]">
<template is="dom-if" if="[[deviceIsEnabled_(deviceStates.WiFi)]]"> <div class="list-frame vertical-list">
<div actionable class="settings-box continuation center" <template is="dom-if"
on-tap="onAddWiFiTap_"> if="[[deviceIsEnabled_(deviceStates.WiFi)]]">
<div class="start add-no-icon">$i18n{internetAddWiFi}</div> <div actionable class="list-item" on-tap="onAddWiFiTap_">
<div class="start">$i18n{internetAddWiFi}</div>
<button class="icon-external" is="paper-icon-button-light"
aria-label="$i18n{internetAddWiFi}">
</button>
</div>
</template>
<div actionable class="list-item" on-tap="onAddVPNTap_">
<div class="start">$i18n{internetAddVPN}</div>
<button class="icon-external" is="paper-icon-button-light" <button class="icon-external" is="paper-icon-button-light"
aria-label="$i18n{internetAddWiFi}"> aria-label="$i18n{internetAddVPN}">
</button> </button>
</div> </div>
</template> <template is="dom-repeat" items="[[thirdPartyVpnProviders_]]">
<div actionable class="settings-box continuation center" <div actionable class="list-item"
on-tap="onAddVPNTap_"> on-tap="onAddThirdPartyVpnTap_" provider="[[item]]">
<div class="start add-no-icon">$i18n{internetAddVPN}</div> <div class="start">[[getAddThirdParrtyVpnLabel_(item)]]</div>
<button class="icon-external" is="paper-icon-button-light" <button class="icon-external" is="paper-icon-button-light"
aria-label="$i18n{internetAddVPN}"> aria-label$="[[getAddThirdParrtyVpnLabel_(item)]]">
</button> </button>
</div>
<template is="dom-repeat" items="[[thirdPartyVpnProviders_]]">
<div actionable class="settings-box continuation center"
on-tap="onAddThirdPartyVpnTap_" provider="[[item]]">
<div class="start add-no-icon">
[[getAddThirdParrtyVpnLabel_(item)]]
</div> </div>
</div> </template>
</template> </div>
</template> </template>
</template> </template>
<template is="dom-if" if="[[!allowAddConnection_(globalPolicy_)]]"> <template is="dom-if" if="[[!allowAddConnection_(globalPolicy_)]]">
......
...@@ -23,11 +23,14 @@ ...@@ -23,11 +23,14 @@
-webkit-margin-end: var(--settings-control-spacing); -webkit-margin-end: var(--settings-control-spacing);
} }
#onoff[on] { #onOff {
color: var(--settings-toggle-color);
font-weight: 500; font-weight: 500;
} }
#onOff[on] {
color: var(--settings-toggle-color);
}
.vpn-header { .vpn-header {
-webkit-margin-end: 12px; -webkit-margin-end: 12px;
-webkit-margin-start: 4px; -webkit-margin-start: 4px;
...@@ -42,7 +45,7 @@ ...@@ -42,7 +45,7 @@
<template is="dom-if" if="[[enableToggleIsVisible_(deviceState)]]"> <template is="dom-if" if="[[enableToggleIsVisible_(deviceState)]]">
<div class="settings-box first"> <div class="settings-box first">
<div id="onoff" class="start" on$="[[deviceIsEnabled_(deviceState)]]"> <div id="onOff" class="start" on$="[[deviceIsEnabled_(deviceState)]]">
[[getOffOnString_(deviceState, [[getOffOnString_(deviceState,
'$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]] '$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]]
</div> </div>
......
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
</ul> </ul>
</div> </div>
<div class="button-container"> <div class="button-container">
<paper-button class="secondary-button" on-tap="onNotNowTap_"> <paper-button class="cancel-button" on-tap="onNotNowTap_">
$i18n{tetherConnectionNotNowButton} $i18n{tetherConnectionNotNowButton}
</paper-button> </paper-button>
<paper-button class="primary-button" on-tap="close"> <paper-button class="action-button" on-tap="close">
$i18n{tetherConnectionConnectButton} $i18n{tetherConnectionConnectButton}
</paper-button> </paper-button>
</div> </div>
......
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,10 @@
-webkit-margin-start: 4px; -webkit-margin-start: 4px;
} }
.primary-button, .primary-button {
color: var(--google-blue-500);
}
a[href] { a[href] {
color: var(--google-blue-700); 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