diff options
author | welch <welch> | 1998-06-27 18:06:37 (GMT) |
---|---|---|
committer | welch <welch> | 1998-06-27 18:06:37 (GMT) |
commit | adcb060b5ab8d310f5aff8a1119d3b97baf86641 (patch) | |
tree | 759f8786c82028afeb67bd971309b7b328d81d7f /library/scrlbar.tcl | |
parent | d010dca55fd7a02e3fe6e50910359d8d4915f003 (diff) | |
download | tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.zip tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.gz tk-adcb060b5ab8d310f5aff8a1119d3b97baf86641.tar.bz2 |
plugin updates
Diffstat (limited to 'library/scrlbar.tcl')
-rw-r--r-- | library/scrlbar.tcl | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index e2b04b7..6073e74 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -20,7 +20,7 @@ if {($tcl_platform(platform) != "windows") && ($tcl_platform(platform) != "macintosh")} { bind Scrollbar <Enter> { - if $tk_strictMotif { + if {$tk_strictMotif} { set tkPriv(activeBg) [%W cget -activebackground] %W config -activebackground [%W cget -background] } @@ -231,8 +231,8 @@ proc tkScrollStartDrag {w x y} { if {$iv0 == 0} { set tkPriv(initPos) 0.0 } else { - set tkPriv(initPos) [expr (double([lindex $tkPriv(initValues) 2])) \ - / [lindex $tkPriv(initValues) 0]] + set tkPriv(initPos) [expr {(double([lindex $tkPriv(initValues) 2])) \ + / [lindex $tkPriv(initValues) 0]}] } } } @@ -253,19 +253,19 @@ proc tkScrollDrag {w x y} { if {$tkPriv(initPos) == ""} { return } - set delta [$w delta [expr $x - $tkPriv(pressX)] [expr $y - $tkPriv(pressY)]] - if [$w cget -jump] { + set delta [$w delta [expr {$x - $tkPriv(pressX)}] [expr {$y - $tkPriv(pressY)}]] + if {[$w cget -jump]} { if {[llength $tkPriv(initValues)] == 2} { - $w set [expr [lindex $tkPriv(initValues) 0] + $delta] \ - [expr [lindex $tkPriv(initValues) 1] + $delta] + $w set [expr {[lindex $tkPriv(initValues) 0] + $delta}] \ + [expr {[lindex $tkPriv(initValues) 1] + $delta}] } else { - set delta [expr round($delta * [lindex $tkPriv(initValues) 0])] + set delta [expr {round($delta * [lindex $tkPriv(initValues) 0])}] eval $w set [lreplace $tkPriv(initValues) 2 3 \ - [expr [lindex $tkPriv(initValues) 2] + $delta] \ - [expr [lindex $tkPriv(initValues) 3] + $delta]] + [expr {[lindex $tkPriv(initValues) 2] + $delta}] \ + [expr {[lindex $tkPriv(initValues) 3] + $delta}]] } } else { - tkScrollToPos $w [expr $tkPriv(initPos) + $delta] + tkScrollToPos $w [expr {$tkPriv(initPos) + $delta}] } } @@ -283,10 +283,10 @@ proc tkScrollEndDrag {w x y} { if {$tkPriv(initPos) == ""} { return } - if [$w cget -jump] { - set delta [$w delta [expr $x - $tkPriv(pressX)] \ - [expr $y - $tkPriv(pressY)]] - tkScrollToPos $w [expr $tkPriv(initPos) + $delta] + if {[$w cget -jump]} { + set delta [$w delta [expr {$x - $tkPriv(pressX)}] \ + [expr {$y - $tkPriv(pressY)}]] + tkScrollToPos $w [expr {$tkPriv(initPos) + $delta}] } set tkPriv(initPos) "" } @@ -375,9 +375,9 @@ proc tkScrollToPos {w pos} { proc tkScrollTopBottom {w x y} { global tkPriv set element [$w identify $x $y] - if [string match *1 $element] { + if {[string match *1 $element]} { tkScrollToPos $w 0 - } elseif [string match *2 $element] { + } elseif {[string match *2 $element]} { tkScrollToPos $w 1 } |