]> git.lyx.org Git - lyx.git/commitdiff
Make scrolling-by-selection smoother
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 20 Jul 2024 17:47:32 +0000 (19:47 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 22 Jul 2024 20:02:04 +0000 (22:02 +0200)
This trivial patch makes scrolling-by-selection smoother by dividing
the step size and the time between steps by 8 when generating
synthetic events in work area.

The scrolling speed is unchanged, but the result is visually better.

src/frontends/qt/GuiWorkArea.cpp

index 462fabda1e16c23999a7d3cf93d8ecfde016185b..4dfd365d7910fb9ba27b79dd2e28c5178f416735 100644 (file)
@@ -943,6 +943,8 @@ void GuiWorkArea::generateSyntheticMouseEvent()
                                step = 80000 / (time * time);
                                time = 40;
                        }
+                       step /= 8;
+                       time /= 8;
                }
                d->synthetic_mouse_event_.timeout.setTimeout(time);
                d->synthetic_mouse_event_.timeout.start();