From d1c90bf7270eb0dd62e1e4924d55bd97636762f0 Mon Sep 17 00:00:00 2001 From: "mrossetti@chromium.org" Date: Tue, 6 Apr 2010 03:36:36 +0000 Subject: Change how the calculation is performed for determining the location of the arrow tip in a bubble window. BUG=40406 TEST=1) Not in full-screen and with language set to English, press Cmd-D and verify bubble is properly positioned with arrow tip pointing to star. Change language to Espanol and repeat test. 2) Now in full-screen, repeat the tests. Review URL: http://codereview.chromium.org/1623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43694 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/info_bubble_view.mm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/browser/cocoa/info_bubble_view.mm') diff --git a/chrome/browser/cocoa/info_bubble_view.mm b/chrome/browser/cocoa/info_bubble_view.mm index 58cd923..1ced0dd 100644 --- a/chrome/browser/cocoa/info_bubble_view.mm +++ b/chrome/browser/cocoa/info_bubble_view.mm @@ -92,4 +92,13 @@ extern const CGFloat kBubbleCornerRadius = 8.0; } } +- (NSPoint)arrowTip { + NSRect bounds = [self bounds]; + CGFloat tipXOffset = kBubbleArrowXOffset + kBubbleArrowWidth / 2.0; + CGFloat xOffset = arrowLocation_ == kTopRight ? NSMaxX(bounds) - tipXOffset : + NSMinX(bounds) + tipXOffset; + NSPoint arrowTip = NSMakePoint(xOffset, NSMaxY(bounds)); + return arrowTip; +} + @end -- cgit v1.1