summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/listbox.tcl12
1 files changed, 10 insertions, 2 deletions
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 1b35b3d..b39e703 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -195,10 +195,18 @@ if {[tk windowingsystem] eq "aqua"} {
}
} else {
bind Listbox <MouseWheel> {
- %W yview scroll [expr {- (%D / 120) * 4}] units
+ incr tk::Priv(wheel_acc_v_%W) %D
+ if {abs($tk::Priv(wheel_acc_v_%W)) >= 120} {
+ %W yview scroll [expr {- ($tk::Priv(wheel_acc_v_%W) / 120) * 4}] units
+ set tk::Priv(wheel_acc_v_%W) 0
+ }
}
bind Listbox <Shift-MouseWheel> {
- %W xview scroll [expr {- (%D / 120) * 4}] units
+ incr tk::Priv(wheel_acc_h_%W) %D
+ if {abs($tk::Priv(wheel_acc_h_%W)) >= 120} {
+ %W xview scroll [expr {- ($tk::Priv(wheel_acc_h_%W) / 120) * 4}] units
+ set tk::Priv(wheel_acc_h_%W) 0
+ }
}
}