aboutsummaryrefslogtreecommitdiff
path: root/desiredata
diff options
context:
space:
mode:
Diffstat (limited to 'desiredata')
-rw-r--r--desiredata/src/desire.tk8
1 files changed, 6 insertions, 2 deletions
diff --git a/desiredata/src/desire.tk b/desiredata/src/desire.tk
index cc9444e9..8cd1f6e1 100644
--- a/desiredata/src/desire.tk
+++ b/desiredata/src/desire.tk
@@ -1962,6 +1962,10 @@ def Canvas bind {eventtype selector args} {
}
}
+def Canvas osx_scroll {axis diff} {
+ $self scroll $axis [expr -abs($diff)/%diff]
+}
+
def Canvas new_binds {} {
# mouse buttons
$self bind <Button> click_wrap %x %y %b 0
@@ -1987,8 +1991,8 @@ def Canvas new_binds {} {
$self bind <Shift-Button-4> scroll x -1
$self bind <Shift-Button-5> scroll x +1
} default {
- $self bind <MouseWheel> scroll y \[expr -abs(%D)/%D\]
- $self bind <Shift-MouseWheel> scroll x \[expr -abs(%D)/%D\]
+ $self bind <MouseWheel> scroll y %D
+ $self bind <Shift-MouseWheel> scroll x %D
}}
$self bind <ButtonRelease> unclick_wrap %x %y %b 0
$self bind <Shift-ButtonRelease> unclick_wrap %x %y %b 1