commit 1cc1f0ba27d1846ba244507529d4795ecfa29a39
Author: Jean-Marc Lasgouttes <lasgout...@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.
---
 src/frontends/qt/GuiWorkArea.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 462fabda1e..4dfd365d79 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -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();
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to