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

Unified Diff: views/bubble/bubble_border.cc

Issue 8493011: Merge 108537 - Align avatar bubble with edge of anchor control (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: Created 9 years, 1 month 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 | « views/bubble/bubble_border.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/bubble/bubble_border.cc
===================================================================
--- views/bubble/bubble_border.cc (revision 108874)
+++ views/bubble/bubble_border.cc (working copy)
@@ -60,12 +60,15 @@
switch (arrow_location_) {
case TOP_LEFT:
case BOTTOM_LEFT:
- x += w / 2 - arrow_offset;
+ x += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ? w / 2 - arrow_offset :
+ -kArrowOverlap;
break;
case TOP_RIGHT:
case BOTTOM_RIGHT:
- x += w / 2 + arrow_offset - border_size.width() + 1;
+ x += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ?
+ w / 2 + arrow_offset - border_size.width() + 1 :
+ w - border_size.width() + kArrowOverlap;
break;
case LEFT_TOP:
@@ -98,12 +101,15 @@
case LEFT_TOP:
case RIGHT_TOP:
- y += h / 2 - arrow_offset;
+ y += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ? h / 2 - arrow_offset :
+ -kArrowOverlap;
break;
case LEFT_BOTTOM:
case RIGHT_BOTTOM:
- y += h / 2 + arrow_offset - border_size.height() + 1;
+ y += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ?
+ h / 2 + arrow_offset - border_size.height() + 1 :
+ h - border_size.height() + kArrowOverlap;
break;
case NONE:
« no previous file with comments | « views/bubble/bubble_border.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698