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

Unified Diff: ui/app_list/views/search_box_view.cc

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 | « ui/app_list/cocoa/apps_search_box_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_box_view.cc
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index 12d166ac32d7c6dcce2cbec72fba36e71637b370..1d997e5e7efd005f5d8b61d52e19cdd5e7b97209 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -29,6 +29,10 @@ const int kMenuButtonDimension = 29;
const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0);
+// Menu offset relative to the bottom-right corner of the menu button.
+const int kMenuYOffsetFromButton = -4;
+const int kMenuXOffsetFromButton = -7;
+
} // namespace
SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
@@ -158,8 +162,10 @@ void SearchBoxView::OnMenuButtonClicked(View* source, const gfx::Point& point) {
if (!menu_)
menu_.reset(new AppListMenuViews(view_delegate_));
- menu_->RunMenuAt(menu_button_,
- menu_button_->GetBoundsInScreen().bottom_right());
+ const gfx::Point menu_location =
+ menu_button_->GetBoundsInScreen().bottom_right() +
+ gfx::Vector2d(kMenuXOffsetFromButton, kMenuYOffsetFromButton);
+ menu_->RunMenuAt(menu_button_, menu_location);
}
void SearchBoxView::IconChanged() {
« no previous file with comments | « ui/app_list/cocoa/apps_search_box_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698