]> Kevux Git Server - rit/commit
gitk: update x11 scrolling for TclTk 8.6 / TIP 171
authorMark Levedahl <mlevedahl@gmail.com>
Fri, 6 Jun 2025 04:03:33 +0000 (00:03 -0400)
committerMark Levedahl <mlevedahl@gmail.com>
Thu, 17 Jul 2025 03:01:51 +0000 (23:01 -0400)
commit82f0b92683a5219587b86d8625110746d2e767b4
treed6548cfc159948e983521edce33583d54ed5b4bc
parent61c74d062bd9fd35c6f9a17b488abce88d560566
gitk: update x11 scrolling for TclTk 8.6 / TIP 171

gitk has x11 mouse bindings that receive button presses, not MouseWheel
events, as this is the Tk implementation through Tk 8.6. On x11, gitk
translates each button event to a scrolling value of +/- 5 for the upper
three panes that scroll vertically as one unit. gitk applies similar
scaling for horizontal scaling of the lower-left commit details pane
(ctext), but not for vertical scrolling of either of the bottom panes.
Rather, the Tk default scrolling actions are used for vertical
scrolling.

Let's make X11 behave similarly to the just modified win32 platform. Do
so by connecting vertical and horizontal scrolling events for the same
items bound in 'proc bind_mousewheel' and using the same user preference
values.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
gitk