diff options
author | welch <welch@noemail.net> | 1998-06-27 18:06:37 (GMT) |
---|---|---|
committer | welch <welch@noemail.net> | 1998-06-27 18:06:37 (GMT) |
commit | a666fb3d6fa6f1ae0921e33edb142295062e2296 (patch) | |
tree | 759f8786c82028afeb67bd971309b7b328d81d7f /library/scale.tcl | |
parent | 9e54810ab83431d4976021d15005c5fe8b4bab5a (diff) | |
download | tk-a666fb3d6fa6f1ae0921e33edb142295062e2296.zip tk-a666fb3d6fa6f1ae0921e33edb142295062e2296.tar.gz tk-a666fb3d6fa6f1ae0921e33edb142295062e2296.tar.bz2 |
plugin updates
FossilOrigin-Name: a31d73e5fbaa868008186067e2535e2f9c3140a0
Diffstat (limited to 'library/scale.tcl')
-rw-r--r-- | library/scale.tcl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/scale.tcl b/library/scale.tcl index 8e96176..f6bb4d3 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -19,7 +19,7 @@ # Standard Motif bindings: bind Scale <Enter> { - if $tk_strictMotif { + if {$tk_strictMotif} { set tkPriv(activeBg) [%W cget -activebackground] %W config -activebackground [%W cget -background] } @@ -29,7 +29,7 @@ bind Scale <Motion> { tkScaleActivate %W %x %y } bind Scale <Leave> { - if $tk_strictMotif { + if {$tk_strictMotif} { %W config -activebackground $tkPriv(activeBg) } if {[%W cget -state] == "active"} { @@ -137,8 +137,8 @@ proc tkScaleButtonDown {w x y} { set tkPriv(dragging) 1 set tkPriv(initValue) [$w get] set coords [$w coords] - set tkPriv(deltaX) [expr $x - [lindex $coords 0]] - set tkPriv(deltaY) [expr $y - [lindex $coords 1]] + set tkPriv(deltaX) [expr {$x - [lindex $coords 0]}] + set tkPriv(deltaY) [expr {$y - [lindex $coords 1]}] $w configure -sliderrelief sunken } } @@ -155,11 +155,11 @@ proc tkScaleButtonDown {w x y} { proc tkScaleDrag {w x y} { global tkPriv - if !$tkPriv(dragging) { + if {!$tkPriv(dragging)} { return } - $w set [$w get [expr $x - $tkPriv(deltaX)] \ - [expr $y - $tkPriv(deltaY)]] + $w set [$w get [expr {$x - $tkPriv(deltaX)}] \ + [expr {$y - $tkPriv(deltaY)}]] } # tkScaleEndDrag -- @@ -197,7 +197,7 @@ proc tkScaleIncrement {w dir big repeat} { if {$big == "big"} { set inc [$w cget -bigincrement] if {$inc == 0} { - set inc [expr abs([$w cget -to] - [$w cget -from])/10.0] + set inc [expr {abs([$w cget -to] - [$w cget -from])/10.0}] } if {$inc < [$w cget -resolution]} { set inc [$w cget -resolution] @@ -206,9 +206,9 @@ proc tkScaleIncrement {w dir big repeat} { set inc [$w cget -resolution] } if {([$w cget -from] > [$w cget -to]) ^ ($dir == "up")} { - set inc [expr -$inc] + set inc [expr {-$inc}] } - $w set [expr [$w get] + $inc] + $w set [expr {[$w get] + $inc}] if {$repeat == "again"} { set tkPriv(afterId) [after [$w cget -repeatinterval] \ |