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

Unified Diff: views/controls/button/button_dropdown.cc

Issue 118002: Gets button_dropdown compiling on linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/button_dropdown.cc
===================================================================
--- views/controls/button/button_dropdown.cc (revision 17191)
+++ views/controls/button/button_dropdown.cc (working copy)
@@ -81,15 +81,10 @@
bool result = ImageButton::OnMouseDragged(e);
if (!show_menu_factory_.empty()) {
- // SM_CYDRAG is a pixel value for minimum dragging distance before operation
- // counts as a drag, and not just as a click and accidental move of a mouse.
- // See http://msdn2.microsoft.com/en-us/library/ms724385.aspx for details.
- int dragging_threshold = GetSystemMetrics(SM_CYDRAG);
-
// If the mouse is dragged to a y position lower than where it was when
// clicked then we should not wait for the menu to appear but show
// it immediately.
- if (e.y() > y_position_on_lbuttondown_ + dragging_threshold) {
+ if (e.y() > y_position_on_lbuttondown_ + GetHorizontalDragThreshold()) {
show_menu_factory_.RevokeAll();
ShowDropDownMenu(GetWidget()->GetNativeView());
}
@@ -133,7 +128,12 @@
View::ConvertPointToScreen(this, &menu_position);
+#if defined(OS_WIN)
int left_bound = GetSystemMetrics(SM_XVIRTUALSCREEN);
+#else
+ int left_bound = 0;
+ NOTIMPLEMENTED();
+#endif
if (menu_position.x() < left_bound)
menu_position.set_x(left_bound);
« no previous file with comments | « no previous file | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698