diff options
author | N.N. <matju@users.sourceforge.net> | 2009-04-16 00:09:32 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2009-04-16 00:09:32 +0000 |
commit | ea0041a3b2bb4434e9b27a39e722f2b396f40426 (patch) | |
tree | c265a602abe9cc262f33d21b84d587acd382e6c7 /desiredata/src | |
parent | 6cc0e95e62e47228dc39dfb5d29d70aee09c8b77 (diff) |
fix scrollbar on osx
svn path=/trunk/; revision=11034
Diffstat (limited to 'desiredata/src')
-rw-r--r-- | desiredata/src/desire.tk | 8 |
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 |