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

Unified Diff: chrome/browser/ui/cocoa/location_bar/star_decoration.mm

Issue 2972593002: Mac: Fix up location bar decoration bubble anchoring. (Closed)
Patch Set: Created 3 years, 5 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 | « chrome/browser/ui/cocoa/location_bar/star_decoration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/star_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
index c0ef9714912a8606645ab80e0c3011e16e13102b..ce2ad68a8647309d4d6712bd84c7adc18d2fc65b 100644
--- a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
@@ -41,8 +41,7 @@ void StarDecoration::SetStarred(bool starred, bool location_bar_is_dark) {
tooltip_.reset([l10n_util::GetNSStringWithFixup(tip_id) retain]);
}
-NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) {
- const NSRect draw_frame = GetDrawRectInFrame(frame);
+NSPoint StarDecoration::GetStarBubblePointInFrame(NSRect draw_frame) {
return NSMakePoint(NSMidX(draw_frame),
NSMaxY(draw_frame) - kStarPointYOffset);
}
@@ -60,6 +59,10 @@ NSString* StarDecoration::GetToolTip() {
return tooltip_.get();
}
+NSPoint StarDecoration::GetBubblePointInFrame(NSRect frame) {
+ return GetStarBubblePointInFrame(GetDrawRectInFrame(frame));
+}
+
SkColor StarDecoration::GetMaterialIconColor(bool location_bar_is_dark) const {
if (location_bar_is_dark) {
return starred_ ? gfx::kGoogleBlue300 : SkColorSetA(SK_ColorWHITE, 0xCC);
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/star_decoration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698