summaryrefslogtreecommitdiffstats
path: root/library/scale.tcl
diff options
context:
space:
mode:
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] \