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

Unified Diff: ash/common/system/web_notification/web_notification_tray.cc

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/web_notification/web_notification_tray.cc
diff --git a/ash/common/system/web_notification/web_notification_tray.cc b/ash/common/system/web_notification/web_notification_tray.cc
index 5ab3774301fdc36f86d40f0f2d24f445ea870cac..8eb162dfb849f946fac6919d2e691c9ac5f015c7 100644
--- a/ash/common/system/web_notification/web_notification_tray.cc
+++ b/ash/common/system/web_notification/web_notification_tray.cc
@@ -222,7 +222,6 @@ WebNotificationTray::WebNotificationTray(WmShelf* shelf,
tray_container()->AddChildView(button_);
button_->SetFocusBehavior(FocusBehavior::NEVER);
SetContentsBackground();
- tray_container()->SetBorder(views::Border::NullBorder());
message_center_tray_.reset(new message_center::MessageCenterTray(
this, message_center::MessageCenter::Get()));
popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate(shelf));
@@ -349,7 +348,6 @@ void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) {
if (alignment == shelf_alignment())
return;
TrayBackgroundView::SetShelfAlignment(alignment);
- tray_container()->SetBorder(views::Border::NullBorder());
// Destroy any existing bubble so that it will be rebuilt correctly.
message_center_tray_->HideMessageCenterBubble();
message_center_tray_->HidePopupBubble();
@@ -521,6 +519,11 @@ bool WebNotificationTray::IsLoggedIn() const {
!shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
}
+void WebNotificationTray::OnPaint(gfx::Canvas* canvas) {
+ // Paint a 1px separator to separate the notification button and status tray.
varkha 2016/07/14 21:34:48 nit: I think this comment is not necessary.
yiyix 2016/07/26 20:27:32 Done.
+ DrawSeparator(canvas);
+}
+
// Methods for testing
bool WebNotificationTray::IsPopupVisible() const {

Powered by Google App Engine
This is Rietveld 408576698