From 4475c2008c5c316c42c5efa880a19dbebea12521 Mon Sep 17 00:00:00 2001 From: John Beard Date: Thu, 22 Nov 2018 16:30:28 +0000 Subject: [PATCH] Zooming: handle smaller, faster, events on GTK+3 On GTK+3, the zoom events are smaller and faster, so the trigger the zoom acceleration. A simple fix is to use the non-accelerated Mac-style zooming and an appropriate constant. This can be tweaked further as needed. Fixes: lp:1786515 * https://bugs.launchpad.net/kicad/+bug/1786515 --- common/view/wx_view_controls.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 85e2ac8cc3..61979f65b6 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -44,6 +44,9 @@ static std::unique_ptr GetZoomControllerForPlatform() // smaller rotation values. For those devices, let's handle zoom // based on the rotation amount rather than the time difference. return std::make_unique( CONSTANT_ZOOM_CONTROLLER::MAC_SCALE ); +#elif __WXGTK3__ + // GTK3 is similar, but the scale constant is smaller + return std::make_unique( CONSTANT_ZOOM_CONTROLLER::GTK3_SCALE ); #else return std::make_unique(); #endif