diff --git a/contrib/hgk b/contrib/hgk --- a/contrib/hgk +++ b/contrib/hgk @@ -299,6 +299,11 @@ proc readotherrefs {base dname excl} { } } +proc allcansmousewheel {delta} { + set delta [expr -5*(int($delta)/abs($delta))] + allcanvs yview scroll $delta units +} + proc error_popup msg { set w .error toplevel $w @@ -470,6 +475,7 @@ proc makewindow {} { bindall <1> {selcanvline %W %x %y} #bindall {selcanvline %W %x %y} + bindall "allcansmousewheel %D" bindall "allcanvs yview scroll -5 units" bindall "allcanvs yview scroll 5 units" bindall <2> "allcanvs scan mark 0 %y"