aboutsummaryrefslogtreecommitdiff
path: root/desiredata
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-05-27 20:11:56 +0000
committerN.N. <matju@users.sourceforge.net>2009-05-27 20:11:56 +0000
commited7b7a2f542e82e9d077f53438c3436906b2bf97 (patch)
tree4f7a3306e929734cdd83d5f27784afaf5f50f4b2 /desiredata
parentc8b4346511ba7e15dc2a67d3e470ec02b2a9f147 (diff)
re-re-re-fix osx scrollbar
svn path=/trunk/; revision=11532
Diffstat (limited to 'desiredata')
-rw-r--r--desiredata/src/desire.tk9
1 files changed, 3 insertions, 6 deletions
diff --git a/desiredata/src/desire.tk b/desiredata/src/desire.tk
index cf1cd852..7da10757 100644
--- a/desiredata/src/desire.tk
+++ b/desiredata/src/desire.tk
@@ -796,6 +796,8 @@ set scale_amount 1.1
class_new Console {View}
+def Console osx_scroll {axis diff} {$@c.1 yview scroll [expr -2-abs($diff)/$diff]}
+
def Console init {c} {
set @c $c
frame $c
@@ -805,9 +807,7 @@ def Console init {c} {
pack $c.2 -side left -fill y -expand no
pack $c -fill both -expand yes
$c.2 set 0.0 1.0
- switch $::OS { osx {
- bind $c.1 <MouseWheel> [list $c.1 yview scroll [expr {-2-abs(%D)/%D}] units]
- }}
+ switch $::OS {osx {bind $c.1 <MouseWheel> [list $self osx_scroll %D]}}
set @lines 0
}
@@ -1946,9 +1946,6 @@ def Canvas bind {eventtype selector args} {
}
}
-# apparently, this method is useless
-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