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

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

Issue 10377183: Ensure the margin for uber tray popup arrow position. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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_bubble.cc
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index 7145615c1cc0a4fe8ef09f0696fd2e7dc954d2cf..5d7f2049d60466fc0eee04a62326e8405d8cbd12 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -210,6 +210,10 @@ class SystemTrayBubbleBorder : public views::BubbleBorder {
if (arrow_type_ == ARROW_TYPE_BOTTOM) {
int tip_x = base::i18n::IsRTL() ? arrow_offset_ :
owner_->width() - arrow_offset_;
+ if (tip_x < kArrowPaddingFromRight + kArrowWidth / 2)
+ tip_x = kArrowPaddingFromRight + kArrowWidth / 2;
+ if (tip_x > owner_->width() - kArrowPaddingFromRight - kArrowWidth / 2)
+ tip_x = owner_->width() - kArrowPaddingFromRight - kArrowWidth / 2;
int left_base_x = tip_x - kArrowWidth / 2;
int left_base_y = y;
int tip_y = left_base_y + kArrowHeight;
« 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