From 414e974ae35c3649db8426147efec31215a5c45a Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Tue, 11 Sep 2018 21:27:52 +0200 Subject: Support smooth scrolling (part 2) Fix scrolling when smooth scrolling is enabled / allow to scroll smoothly for: - canvas palette - node selection in path tool - selection cycling in select tool while holding Alt key - spraying in spray tool with mouse wheel - adjusting color by scrolling in lower left stroke/fill fields --- src/ui/tool/node.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ui/tool/node.cpp') diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 9223b44de..49ee0cb1d 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -980,7 +980,11 @@ bool Node::_eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent dir = 1; } else if (event->scroll.direction == GDK_SCROLL_DOWN) { dir = -1; - } else break; + } else if (event->scroll.direction == GDK_SCROLL_SMOOTH) { + dir = event->scroll.delta_y > 0 ? -1 : 1; + } else { + break; + } if (held_control(event->scroll)) { _linearGrow(dir); } else { -- cgit v1.2.3