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

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

Issue 10027007: ash: Make sure the uber-tray popup is positioned correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index ed64a7e2e9dc44f78a42a7656ffb13e71a722a74..ad155934403a75f4d4f25f2d01365ddae665cb40 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -221,7 +221,9 @@ class SystemTrayBubbleBorder : public views::Border {
owner_->width() - kShadowOffset, kShadowHeight),
kShadowColor);
- if (Shell::GetInstance()->shelf()->IsVisible()) {
+ Shell* shell = Shell::GetInstance();
+ if (shell->shelf()->IsVisible() &&
+ !shell->tray()->GetWidget()->GetWindowScreenBounds().IsEmpty()) {
sadrul 2012/04/09 00:08:37 Should 'IsVisible' check whether it has non-empty
sky 2012/04/09 15:11:21 Yes, I think that's a good idea.
sadrul 2012/04/09 20:56:28 Done.
// Draw the arrow.
int left_base_x = owner_->width() - kArrowPaddingFromRight - kArrowWidth;
int left_base_y = y;
@@ -351,6 +353,12 @@ class SystemTrayBubble : public views::BubbleDelegateView {
}
}
+ virtual gfx::Rect GetAnchorRect() OVERRIDE {
+ gfx::Rect rect = tray_->GetWidget()->GetWindowScreenBounds();
+ rect.Inset(0, 0, kPaddingFromRightEdgeOfScreen, 0);
+ return rect;
+ }
+
// Overridden from views::View.
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
state->role = ui::AccessibilityTypes::ROLE_WINDOW;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698