# HG changeset patch # User Patrick Mezard # Date 1185114109 -7200 # Node ID 713426631adf5e11cfe99939f4743847b8e74fc5 # Parent cf67b5f3743d827c70f3d26da2b010f30d647522 hgk: enable mouse wheel on MouseWheel events. At this point, mouse wheel still does not work under Windows. 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"