summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 16:09:19 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 16:09:19 +0000
commit13021a6b8967c3ccb9792a7f4345707f43b94f7f (patch)
tree00871a39e56ec9add0d32659300b082712bd71f4 /ash
parentb0ed0e3a176b5c5b2a0cf4e4d66dae9daf7b0428 (diff)
downloadchromium_src-13021a6b8967c3ccb9792a7f4345707f43b94f7f.zip
chromium_src-13021a6b8967c3ccb9792a7f4345707f43b94f7f.tar.gz
chromium_src-13021a6b8967c3ccb9792a7f4345707f43b94f7f.tar.bz2
Ensure the margin for uber tray popup arrow position.
BUG=128472 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10377183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/system/tray/system_tray_bubble.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index 7145615..5d7f204 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;