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

Unified Diff: ui/app_list/cocoa/apps_search_box_controller.mm

Issue 22642007: Update the menu offsets for the OSX and Win App Launchers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase/no-op Created 7 years, 4 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 | ui/app_list/views/search_box_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_search_box_controller.mm
diff --git a/ui/app_list/cocoa/apps_search_box_controller.mm b/ui/app_list/cocoa/apps_search_box_controller.mm
index 24143cd270f2fba8cc672928c1d669997676a90a..4f02a20c56bab4b6dc0aae6751a71f07411535e5 100644
--- a/ui/app_list/cocoa/apps_search_box_controller.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller.mm
@@ -30,8 +30,9 @@ const CGFloat kSearchIconDimension = 32;
// Size of the menu button on the right.
const CGFloat kMenuButtonDimension = 29;
-// Vertical offset that the menu should appear below the menu button.
-const CGFloat kMenuOffsetFromButton = 2;
+// Menu offset relative to the bottom-right corner of the menu button.
+const CGFloat kMenuYOffsetFromButton = -4;
+const CGFloat kMenuXOffsetFromButton = -7;
}
@@ -392,8 +393,8 @@ void SearchBoxModelObserverBridge::TextChanged() {
NSRect anchorRect = [menuButton convertRect:[menuButton bounds]
toView:nil];
NSPoint anchorPoint = [[menuButton window] convertBaseToScreen:NSMakePoint(
- NSMaxX(anchorRect),
- NSMinY(anchorRect) - kMenuOffsetFromButton)];
+ NSMaxX(anchorRect) + kMenuXOffsetFromButton,
+ NSMinY(anchorRect) - kMenuYOffsetFromButton)];
NSRect confinementRect = [[menuButton window] frame];
confinementRect.size = NSMakeSize(anchorPoint.x - NSMinX(confinementRect),
anchorPoint.y - NSMinY(confinementRect));
« no previous file with comments | « no previous file | ui/app_list/views/search_box_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698