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

Unified Diff: ash/common/system/tray/tray_background_view.h

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/common/system/tray/tray_background_view.h
diff --git a/ash/common/system/tray/tray_background_view.h b/ash/common/system/tray/tray_background_view.h
index 478e427bda77e0b79719747d9decd52ee0a0e6a2..66530d860444c29d42e4ca1d28306a3eba586add 100644
--- a/ash/common/system/tray/tray_background_view.h
+++ b/ash/common/system/tray/tray_background_view.h
@@ -135,13 +135,14 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// Updates the arrow visibility based on the launcher visibility.
void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view);
+ protected:
+ // In the given |canvas|, draw a 1px wide and 32dp high separator line to the
varkha 2016/07/14 21:34:48 nit: s/draw/draws nit: s/high/tall
yiyix 2016/07/26 20:27:31 Done.
+ // right of the tray item.
varkha 2016/07/14 21:34:48 nit: clarify which tray item.
yiyix 2016/07/26 20:27:31 Done.
+ void DrawSeparator(gfx::Canvas* canvas);
+
private:
class TrayWidgetObserver;
- // Called from Initialize after all status area trays have been created.
- // Sets the border based on the position of the view.
- void SetTrayBorder();
-
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override;
bool RequiresNotificationWhenAnimatorDestroyed() const override;
@@ -150,6 +151,12 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// SetVisible(false) is called.
void HideTransformation();
+ // For Material Design, some extra padding is added to tray items so there is
varkha 2016/07/14 21:34:48 nit: drop "some"
yiyix 2016/07/26 20:27:31 Done.
+ // enough places to draw separator between this tray and the tray to the left
+ // (if horizontally aligned) or to the bottom (if vertically aligned) if
+ // separator needed. No border is set for non-MD.
varkha 2016/07/14 21:34:48 nit: s/separator/a separator is
yiyix 2016/07/26 20:27:31 Done.
+ void CalculateAndSetTrayContainerBorder();
+
// The shelf containing the system tray for this view.
WmShelf* wm_shelf_;

Powered by Google App Engine
This is Rietveld 408576698