New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 901989 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Fix padding in system tray

Project Member Reported by sgabr...@chromium.org, Nov 5

Issue description

Current padding doesn't match the spec: https://gallery.googleplex.com/projects/MCHbtQVoQ2HCZXS6M2rSjiqy/files/MCGWDM8eaujQbl-tc0V_WItowMSJbxAVNpw


 
aligment issue preview.png
150 KB View Download
spacing specification.png
293 KB View Download
Labels: -Pri-2 Pri-1
Cc: omrilio@chromium.org tetsui@chromium.org
Cc: yamaguchi@chromium.org jennschen@chromium.org sgabr...@chromium.org ajha@chromium.org kuscher@chromium.org
 Issue 884651  has been merged into this issue.
Thanks Sébastien. So if I read the spec correctly (and assuming a left-to-right UI), the padding to the *right* of each of these is:

* 4px to the right of input language, notification badge, and family link
* 0 to the right of the clock (which is always at the far right) -- just the padding already built into the area
* 2px to the right of everything else

Let me know if I misundersood anything :-)
Labels: -Restrict-View-Google
Removing Google restriction.
I actually expressed the spec in a confusing way. The goal is to compensate for the vertical aspect ratio of the battery, therefore, there should always be 2px padding left and right of the battery, everything else should have 4px padding. See following configuration (excluding side padding)

- Notification |4px| Cell |2px| Battery |2px| Clock
- Do not disturb |4px| Cell |4px| Wifi |2px| Battery |2px| Clock
- Keyboard language |4px| Device management Cell |4px| Wifi |2px| Battery |2px| Clock
- Notification |4px| Clock

For the latter - No battery use case- which happens on Chromebox, you'll notice the padding is 4px between notification icons and Clock.


Understood, thanks a lot for clarifying!
Maybe a simpler way to say that is:

* All these widgets have a left and right margin of 2 px
* Except for the battery, which has only 1 px of left and right margin
* The rightmost item has no right margin, and the leftmost item has no left margin

Comment 9 Deleted

Status: Started (was: Assigned)
Before (top) and after (bottom) with pending CL.
before_after.png
18.3 KB View Download
It looks like there's still a problem of padding, probably linked to the size of the asset containers. See comparison with the spec attached. It seems to me like they are not contained within their 20*20px containers.


overlap.png
43.3 KB View Download
comparison.png
60.9 KB View Download
Some more small bits and pieces. Attaching 1) current version, 2) what I get when removing all padding, 3) comparison with what Sebastien would expect with no padding. So I'm gonna start with reducing that difference before adding padding again.
current.png
8.7 KB View Download
no_padding_anywhere.png
8.4 KB View Download
no_padding_anywhere_comparison.png
11.1 KB View Download
Bounds of the battery icon.
no_padding_battery_bounds.png
9.0 KB View Download
I think the main differences are 1) the padding of the whole area, and 2) padding around the text "US"
2018-11-10-010214_643x571_scrot.png
24.2 KB View Download
With 8 instead of 5 as outside padding things match a lot better. Maybe it's better to specify that padding separately instead of making the text labels have padding on both sides that contribute to the outside padding.
unnamed.png
24.3 KB View Download
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35c5e6ff1248c790245768efed78235c32811d8e

commit 35c5e6ff1248c790245768efed78235c32811d8e
Author: Manu Cornet <manucornet@chromium.org>
Date: Mon Nov 19 05:32:01 2018

CrOS sys tray: fix padding to better match spec

A few changes here:

* Specify padding on both ends of the whole tray separately (instead
  of using space around some tray items to build it up)
* Override the size function for the battery to better match its
  actual visual footprint.
* Specify padding between items with one single number, used at the
  layout level.

This all allows for simpler code while better matching the specs.

Bug:  901989 
Change-Id: Ia75dcfc7b355b114e6492c26ee4ce6372af92f71
Reviewed-on: https://chromium-review.googlesource.com/c/1328042
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609183}
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/date/date_view.cc
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/power/tray_power.cc
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/power/tray_power.h
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/tray/tray_constants.h
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/tray/tray_container.cc
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/tray/tray_item_view.cc
[modify] https://crrev.com/35c5e6ff1248c790245768efed78235c32811d8e/ash/system/tray/tray_item_view.h

Status: Fixed (was: Started)

Sign in to add a comment