提交 122b8079 编写于 作者: G Gabriele Mazzotta 提交者: Paul Mackerras

gitk: Enable mouse horizontal scrolling in diff pane

Currently it's required to hold Shift and scroll up and down to move
horizontally. Listen to Button-6 and Button-7 events too to make
horizontal scrolling handier with touchpads and some mice.
Signed-off-by: NGabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 e203d1dc
......@@ -2516,6 +2516,13 @@ proc makewindow {} {
} else {
bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
bindall <ButtonRelease-5> "allcanvs yview scroll 5 units"
bind $ctext <Button> {
if {"%b" eq 6} {
$ctext xview scroll -5 units
} elseif {"%b" eq 7} {
$ctext xview scroll 5 units
}
}
if {[tk windowingsystem] eq "aqua"} {
bindall <MouseWheel> {
set delta [expr {- (%D)}]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册