[LyX/2.4.x] Make scrolling-by-selection smoother
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Jul 25 16:20:53 UTC 2024
commit 73bfef16f3d5a9fe1064dfb8b2782bf82111e4c0
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Sat Jul 20 19:47:32 2024 +0200
Make scrolling-by-selection smoother
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 | 2 ++
status.24x | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 7f5cb22127..3f7c34dc4d 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -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();
diff --git a/status.24x b/status.24x
index 8a9d1ea3ec..ae1989d85f 100644
--- a/status.24x
+++ b/status.24x
@@ -33,6 +33,8 @@ What's new
- Show font info in status line again.
+- Make scrolling smoother when using selection.
+
* DOCUMENTATION AND LOCALIZATION
More information about the lyx-cvs
mailing list