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

Unified Diff: ash/system/tray/tray_background_view.cc

Issue 22375009: Correcting bubble offsets of notifications when the tray menu is shown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_background_view.cc
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index 2d788d624a8ed20862e348f9a4b39b8c9e747bc6..51f00c3bc0c12023cb923fad648a9c8eb7b4f1a0 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -530,11 +530,15 @@ gfx::Rect TrayBackgroundView::GetBubbleAnchorRect(
}
} else if (anchor_type == TrayBubbleView::ANCHOR_TYPE_BUBBLE) {
// Invert the offsets to align with the bubble below.
+ // Note that with the alternate shelf layout the tips are not shown and
+ // the offsets for left and right alignment do not need to be applied.
+ int vertical_alignment = ash::switches::UseAlternateShelfLayout() ?
+ 0 : kPaddingFromInnerEdgeOfLauncherVerticalAlignment;
if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_LEFT) {
- rect.Inset(kPaddingFromInnerEdgeOfLauncherVerticalAlignment,
+ rect.Inset(vertical_alignment,
0, 0, kPaddingFromBottomOfScreenVerticalAlignment);
} else if (anchor_alignment == TrayBubbleView::ANCHOR_ALIGNMENT_RIGHT) {
- rect.Inset(0, 0, kPaddingFromInnerEdgeOfLauncherVerticalAlignment,
+ rect.Inset(0, 0, vertical_alignment,
kPaddingFromBottomOfScreenVerticalAlignment);
}
}
« no previous file with comments | « no previous file | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698