]> 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>
Thu, 25 Jul 2024 16:20:38 +0000 (18:20 +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.

(cherry picked from commit 1cc1f0ba27d1846ba244507529d4795ecfa29a39)

src/frontends/qt/GuiWorkArea.cpp
status.24x

index 7f5cb221273a5bc9c584c1d2daf707999847d77e..3f7c34dc4d4e0702921d66953b39614c28ed93ac 100644 (file)
@@ -945,6 +945,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();
index 8a9d1ea3ec700a380106ea35e909e9425ef25ac2..ae1989d85f8912a7185f5307e6c3f8ffd17da058 100644 (file)
@@ -33,6 +33,8 @@ What's new
 
 - Show font info in status line again.
 
+- Make scrolling smoother when using selection.
+
 
 * DOCUMENTATION AND LOCALIZATION