Commit c47b4076 authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

Settings[DICE]: adjust sync icon location.

Bug: 817117
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I69996a0a30fba0dbedba95745dd396eb1500769b
Reviewed-on: https://chromium-review.googlesource.com/954292
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542314}
parent 91cede69
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
<dom-module id="settings-sync-account-control"> <dom-module id="settings-sync-account-control">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
:host {
--sync-icon-size: 16px;
--sync-icon-border-size: 2px;
--shown-avatar-size: 40px;
}
setting-box.middle { setting-box.middle {
/* Per spec, middle text is indented 20px in this section. */ /* Per spec, middle text is indented 20px in this section. */
-webkit-margin-start: 20px; -webkit-margin-start: 20px;
...@@ -23,8 +29,8 @@ ...@@ -23,8 +29,8 @@
.account-icon { .account-icon {
border-radius: 20px; border-radius: 20px;
flex-shrink: 0; flex-shrink: 0;
height: 40px; height: var(--shown-avatar-size);
width: 40px; width: var(--shown-avatar-size);
} }
.account-icon.small { .account-icon.small {
...@@ -50,29 +56,30 @@ ...@@ -50,29 +56,30 @@
position: relative; position: relative;
} }
#sync-logo-container { #sync-icon-container {
align-items: center; align-items: center;
background: var(--google-blue-500); background: var(--google-blue-500);
border: 2px solid white; border: var(--sync-icon-border-size) solid white;
border-radius: 50%; border-radius: 50%;
bottom: 0;
display: flex; display: flex;
height: 16px; height: var(--sync-icon-size);
position: absolute; position: absolute;
right: -6px; right: -6px;
width: 16px; top: calc(var(--shown-avatar-size) - var(--sync-icon-size) -
var(--sync-icon-border-size));
width: var(--sync-icon-size);
} }
:host-context([dir='rtl']) #sync-logo-container { :host-context([dir='rtl']) #sync-icon-container {
left: -6px; left: -6px;
right: initial; right: initial;
} }
#sync-logo-container[syncing] { #sync-icon-container[syncing] {
background: green; background: green;
} }
#sync-logo-container iron-icon { #sync-icon-container iron-icon {
fill: white; fill: white;
height: 12px; height: 12px;
margin: auto; margin: auto;
...@@ -140,7 +147,7 @@ ...@@ -140,7 +147,7 @@
<div id="avatar-container"> <div id="avatar-container">
<img class="account-icon" alt="" <img class="account-icon" alt=""
src="[[getAccountImageSrc_(shownAccount_.avatarImage)]]"> src="[[getAccountImageSrc_(shownAccount_.avatarImage)]]">
<div id="sync-logo-container" syncing$="[[syncStatus.signedIn]]"> <div id="sync-icon-container" syncing$="[[syncStatus.signedIn]]">
<iron-icon icon="notification:sync"></iron-icon> <iron-icon icon="notification:sync"></iron-icon>
</div> </div>
</div> </div>
......
...@@ -155,7 +155,7 @@ cr.define('settings_sync_account_control', function() { ...@@ -155,7 +155,7 @@ cr.define('settings_sync_account_control', function() {
assertVisible(testElement.$$('#dropdown-arrow'), true); assertVisible(testElement.$$('#dropdown-arrow'), true);
assertFalse( assertFalse(
testElement.$$('#sync-logo-container').hasAttribute('syncing')); testElement.$$('#sync-icon-container').hasAttribute('syncing'));
testElement.$$('#dropdown-arrow').click(); testElement.$$('#dropdown-arrow').click();
Polymer.dom.flush(); Polymer.dom.flush();
...@@ -208,7 +208,7 @@ cr.define('settings_sync_account_control', function() { ...@@ -208,7 +208,7 @@ cr.define('settings_sync_account_control', function() {
assertVisible(testElement.$$('#dropdown-arrow'), false); assertVisible(testElement.$$('#dropdown-arrow'), false);
assertVisible(testElement.$$('#promo-headers'), false); assertVisible(testElement.$$('#promo-headers'), false);
assertTrue( assertTrue(
testElement.$$('#sync-logo-container').hasAttribute('syncing')); testElement.$$('#sync-icon-container').hasAttribute('syncing'));
assertFalse(!!testElement.$$('#menu')); assertFalse(!!testElement.$$('#menu'));
const userInfo = testElement.$$('#user-info'); const userInfo = testElement.$$('#user-info');
......
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