Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed)

Created:
4 years, 5 months ago by yiyix
Modified:
4 years, 4 months ago
CC:
chromium-reviews, kalyank, sadrul, oshima+watch_chromium.org, tdanderson
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Draw a 1px(hardware pixel) separator between 2 tray items When the shelf is semi-transparent or opaque, draw a 1*32px separator line between 2 tray items except before and after the logout button (currently, it is off by default, behind --ash-md=experimental). After tray's visibility changes, OnTrayVisibilityChanged in StatusAreaWidget will be called to compute the visibility of the separator accordingly. TEST=manual: - Change device screen factor to different number, check if the separator width stays at 1px and separator height is updated proportionally. - Check if the separator shows if and only if when shelf is semi-transparent (by open a window overlapping with the shelf) or opaque (by open a maximized window). - Change shelf alignment from bottom to left to right, check if the separator updates its orientation. - Change the visibility of logout button by switching between the public account and the personal account, check if the separator hides both before and after the logout button if it is visible and separator hide when it is not visible. BUG=605993 Committed: https://crrev.com/6cf3f3eac174b448c518483ddbc1ae7dc47b2b2e Cr-Commit-Position: refs/heads/master@{#413220}

Patch Set 1 #

Patch Set 2 : merge #

Total comments: 58

Patch Set 3 : new approach #

Total comments: 1

Patch Set 4 : update class names #

Patch Set 5 : nits #

Patch Set 6 : update observer #

Patch Set 7 : merge #

Total comments: 66

Patch Set 8 : address comments #

Total comments: 38

Patch Set 9 : merge conflicts + comments #

Total comments: 30

Patch Set 10 : fix ways to calculate x position for separator + fix comments #

Total comments: 20

Patch Set 11 : address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -74 lines) Patch
M ash/common/shelf/wm_shelf.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M ash/common/shelf/wm_shelf.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M ash/common/system/chromeos/ime_menu/ime_menu_tray.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M ash/common/system/chromeos/session/logout_button_tray.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M ash/common/system/overview/overview_button_tray.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -11 lines 0 comments Download
M ash/common/system/status_area_widget.h View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -0 lines 0 comments Download
M ash/common/system/status_area_widget.cc View 1 2 3 4 5 6 7 8 9 4 chunks +78 lines, -37 lines 0 comments Download
M ash/common/system/tray/tray_background_view.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -5 lines 0 comments Download
M ash/common/system/tray/tray_background_view.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +73 lines, -14 lines 0 comments Download
M ash/common/system/tray/tray_constants.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M ash/common/system/tray/tray_constants.cc View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 93 (63 generated)
yiyix
@varkha, Could you please take look?
4 years, 5 months ago (2016-07-14 01:12:46 UTC) #3
varkha
In the CL description: behind --ash-md --> behind --ash-md=experimental Clarify 1px (1 dp or 1 ...
4 years, 5 months ago (2016-07-14 21:34:48 UTC) #12
yiyix
@varkha, could you please look at the new approach. Please find the design doc here: ...
4 years, 4 months ago (2016-07-26 20:27:32 UTC) #13
varkha
https://codereview.chromium.org/2147143002/diff/40001/ash/common/system/view_observer.h File ash/common/system/view_observer.h (right): https://codereview.chromium.org/2147143002/diff/40001/ash/common/system/view_observer.h#newcode15 ash/common/system/view_observer.h:15: class ASH_EXPORT ViewObserver { This name seems too generic. ...
4 years, 4 months ago (2016-07-26 23:10:15 UTC) #18
varkha
I would include a link to the design doc in the CL description and a ...
4 years, 4 months ago (2016-07-26 23:11:11 UTC) #19
yiyix
4 years, 4 months ago (2016-07-27 16:01:57 UTC) #30
yiyix
On 2016/07/27 16:01:57, yiyix wrote: @jamescook, Could you please take a look? Thank you.
4 years, 4 months ago (2016-07-27 16:02:32 UTC) #31
James Cook
Rather than introducing a new observer, what about adding a method to WmShelfObserver and having ...
4 years, 4 months ago (2016-07-27 16:45:08 UTC) #34
yiyix
@jamescook, I updated the observer. Could you take another look at this code change? Thank ...
4 years, 4 months ago (2016-08-08 22:38:39 UTC) #51
James Cook
I'm sorry I didn't make this comment before, but this CL seems to do a ...
4 years, 4 months ago (2016-08-09 00:25:18 UTC) #52
James Cook
I would also be OK with adding WmShelf::GetStatusAreaWidget() and using that. (Long term I want ...
4 years, 4 months ago (2016-08-09 06:19:28 UTC) #53
varkha
https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/chromeos/session/logout_button_tray.h File ash/common/system/chromeos/session/logout_button_tray.h (right): https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/chromeos/session/logout_button_tray.h#newcode30 ash/common/system/chromeos/session/logout_button_tray.h:30: explicit LogoutButtonTray(WmShelf* wm_shelf, nit: no need for explicit. https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/status_area_widget.cc ...
4 years, 4 months ago (2016-08-10 23:27:25 UTC) #54
varkha
https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/chromeos/session/logout_button_tray.h File ash/common/system/chromeos/session/logout_button_tray.h (right): https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/chromeos/session/logout_button_tray.h#newcode30 ash/common/system/chromeos/session/logout_button_tray.h:30: explicit LogoutButtonTray(WmShelf* wm_shelf, nit: no need for explicit. https://codereview.chromium.org/2147143002/diff/180001/ash/common/system/status_area_widget.cc ...
4 years, 4 months ago (2016-08-10 23:27:25 UTC) #55
yiyix
I am using WmShelf::GetStatusAreaWidget() to expose the StatusAreaWidget to TrayBackgroundView. Thank you for the detailed ...
4 years, 4 months ago (2016-08-11 01:23:20 UTC) #57
yiyix
@jamescook and @varkha: Could you review this change? Thank you.
4 years, 4 months ago (2016-08-11 19:21:56 UTC) #64
varkha
https://codereview.chromium.org/2147143002/diff/240001/ash/common/system/status_area_widget.cc File ash/common/system/status_area_widget.cc (right): https://codereview.chromium.org/2147143002/diff/240001/ash/common/system/status_area_widget.cc#newcode263 ash/common/system/status_area_widget.cc:263: // If |logout_button_tray_| is visible, then no leading separator ...
4 years, 4 months ago (2016-08-11 20:01:03 UTC) #65
James Cook
Almost there! https://codereview.chromium.org/2147143002/diff/240001/ash/aura/wm_shelf_aura.h File ash/aura/wm_shelf_aura.h (right): https://codereview.chromium.org/2147143002/diff/240001/ash/aura/wm_shelf_aura.h#newcode19 ash/aura/wm_shelf_aura.h:19: class StatusAreaWidget; nit: not needed (in general, ...
4 years, 4 months ago (2016-08-11 20:36:55 UTC) #66
James Cook
https://codereview.chromium.org/2147143002/diff/240001/ash/common/system/tray/tray_background_view.cc File ash/common/system/tray/tray_background_view.cc (right): https://codereview.chromium.org/2147143002/diff/240001/ash/common/system/tray/tray_background_view.cc#newcode536 ash/common/system/tray/tray_background_view.cc:536: const float scale = canvas->UndoDeviceScaleFactor(); Also, I still think ...
4 years, 4 months ago (2016-08-11 22:39:14 UTC) #67
yiyix
Merged with changes made by @yoshiki. re-worked the logics of adding insets to traybackgroundview. @jamescook ...
4 years, 4 months ago (2016-08-18 00:43:00 UTC) #71
yoshiki
I tested this on ARC++ environment. It's almost good but the separator position looks wrong ...
4 years, 4 months ago (2016-08-18 08:39:08 UTC) #74
tdanderson
I'm not 100% sure why PanelLayoutManagerTest.TouchHitTestPanel is failing on Win trybots for Patch Set 9 ...
4 years, 4 months ago (2016-08-18 16:15:48 UTC) #76
varkha
https://codereview.chromium.org/2147143002/diff/260001/ash/common/system/status_area_widget.h File ash/common/system/status_area_widget.h (right): https://codereview.chromium.org/2147143002/diff/260001/ash/common/system/status_area_widget.h#newcode102 ash/common/system/status_area_widget.h:102: // Check if |tray| is next visible view in ...
4 years, 4 months ago (2016-08-18 16:33:24 UTC) #77
yiyix
@yoshiki, I think I have fixed the problem with the separator showing in the wrong ...
4 years, 4 months ago (2016-08-18 20:01:43 UTC) #78
James Cook
LGTM with nits https://codereview.chromium.org/2147143002/diff/270001/ash/common/system/tray/tray_background_view.cc File ash/common/system/tray/tray_background_view.cc (right): https://codereview.chromium.org/2147143002/diff/270001/ash/common/system/tray/tray_background_view.cc#newcode113 ash/common/system/tray/tray_background_view.cc:113: bounds = gfx::Rect(view->GetLocalBounds().x() + kHitRegionPadding, nit: ...
4 years, 4 months ago (2016-08-19 00:55:51 UTC) #79
yoshiki
As I tested, it looks working well with arc apps. Thank you for your hard ...
4 years, 4 months ago (2016-08-19 03:45:31 UTC) #80
varkha
LGTM with nits. Thanks for pulling this through with all the small details! https://codereview.chromium.org/2147143002/diff/270001/ash/common/system/overview/overview_button_tray.cc File ...
4 years, 4 months ago (2016-08-19 16:33:39 UTC) #83
yiyix
Address all nits. https://codereview.chromium.org/2147143002/diff/270001/ash/common/system/overview/overview_button_tray.cc File ash/common/system/overview/overview_button_tray.cc (right): https://codereview.chromium.org/2147143002/diff/270001/ash/common/system/overview/overview_button_tray.cc#newcode130 ash/common/system/overview/overview_button_tray.cc:130: kVerticalShelfVerticalPadding, kVerticalShelfHorizontalPadding))); On 2016/08/19 16:33:39, varkha ...
4 years, 4 months ago (2016-08-19 19:07:56 UTC) #86
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2147143002/290001
4 years, 4 months ago (2016-08-19 19:08:50 UTC) #89
commit-bot: I haz the power
Committed patchset #11 (id:290001)
4 years, 4 months ago (2016-08-19 19:57:15 UTC) #91
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 19:59:23 UTC) #93
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/6cf3f3eac174b448c518483ddbc1ae7dc47b2b2e
Cr-Commit-Position: refs/heads/master@{#413220}

Powered by Google App Engine
This is Rietveld 408576698