summaryrefslogtreecommitdiffstats
path: root/library/scale.tcl
diff options
context:
space:
mode:
authorwelch <welch>1998-06-27 18:06:37 (GMT)
committerwelch <welch>1998-06-27 18:06:37 (GMT)
commitadcb060b5ab8d310f5aff8a1119d3b97baf86641 (patch)
tree759f8786c82028afeb67bd971309b7b328d81d7f /library/scale.tcl
parentd010dca55fd7a02e3fe6e50910359d8d4915f003 (diff)
downloadtk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.zip
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.gz
tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.bz2
plugin updates
Diffstat (limited to 'library/scale.tcl')
-rw-r--r--library/scale.tcl20
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] \