| Index: ui/events/gesture_detection/gesture_config_helper_aura.cc
|
| diff --git a/ui/events/gesture_detection/gesture_config_helper_aura.cc b/ui/events/gesture_detection/gesture_config_helper_aura.cc
|
| index 6824959a0fd62f50c418a85df75b3ef76947b6a2..9c6603f166f02300b1303985b2fa4a1eb18985fb 100644
|
| --- a/ui/events/gesture_detection/gesture_config_helper_aura.cc
|
| +++ b/ui/events/gesture_detection/gesture_config_helper_aura.cc
|
| @@ -2,8 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +// MSVC++ requires this to be set before any other includes to get M_PI.
|
| +#define _USE_MATH_DEFINES
|
| +
|
| #include "ui/events/gesture_detection/gesture_config_helper.h"
|
|
|
| +#include <cmath>
|
| +
|
| #include "ui/events/gestures/gesture_configuration.h"
|
| #include "ui/gfx/screen.h"
|
|
|
| @@ -25,12 +30,12 @@ GestureDetector::Config DefaultGestureDetectorConfig() {
|
| GestureConfiguration::max_distance_between_taps_for_double_tap();
|
| config.minimum_fling_velocity =
|
| GestureConfiguration::min_scroll_velocity();
|
| - config.maximum_fling_velocity =
|
| - GestureConfiguration::fling_velocity_cap();
|
| + config.maximum_fling_velocity = GestureConfiguration::fling_velocity_cap();
|
| config.swipe_enabled = true;
|
| config.minimum_swipe_velocity = GestureConfiguration::min_swipe_speed();
|
| config.maximum_swipe_deviation_angle =
|
| - atan2(1.f, GestureConfiguration::max_swipe_deviation_ratio());
|
| + atan2(1.f, GestureConfiguration::max_swipe_deviation_ratio()) * 180.0f /
|
| + static_cast<float>(M_PI);
|
| config.two_finger_tap_enabled = true;
|
| config.two_finger_tap_max_separation =
|
| GestureConfiguration::max_distance_for_two_finger_tap_in_pixels();
|
| @@ -46,8 +51,7 @@ ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() {
|
|
|
| config.gesture_detector_config = DefaultGestureDetectorConfig();
|
| config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2;
|
| - config.min_scaling_span =
|
| - GestureConfiguration::min_distance_for_pinch_scroll_in_pixels();
|
| + config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels();
|
| return config;
|
| }
|
|
|
|
|