Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20170
Modified Files: Tag: desiredata desire.tk Log Message: fix for Slider size
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.161 retrieving revision 1.1.2.600.2.162 diff -C2 -d -r1.1.2.600.2.161 -r1.1.2.600.2.162 *** desire.tk 11 Jan 2007 15:05:24 -0000 1.1.2.600.2.161 --- desire.tk 11 Jan 2007 18:13:30 -0000 1.1.2.600.2.162 *************** *** 5387,5390 **** --- 5387,5391 ---- def Slider reinit {mess} { super $mess + set @knob_thick 4 switch [lindex $mess 4] { hsl {set @orient 0} *************** *** 5400,5404 **** def Slider bbox {} { mset {x1 y1} [$self xy] ! list $x1 $y1 [expr $x1+$@w] [expr $y1+$@h] }
--- 5401,5409 ---- def Slider bbox {} { mset {x1 y1} [$self xy] ! if {!$@orient} { ! list $x1 $y1 [expr $x1+$@w+$@knob_thick] [expr $y1+$@h] ! } else { ! list $x1 [expr $y1-$@knob_thick] [expr $x1+$@w] [expr $y1+$@h] ! } }
*************** *** 5409,5418 **** set color [$self look bg] set scaled [expr {$@value*($l-1)/$span}] if {$@orient} { set y [expr $y1+$@h-$scaled-2] set coords [list [expr $x1+2] $y [expr $x1+$@w-2] [expr $y-2]] } else { set x [expr $x1+$scaled] ! set coords [list $x [expr $y1+2] [expr $x+2] [expr $y1+$@h-2]] } $self item KNOB rectangle $coords -outline red -fill [darker $color] --- 5414,5426 ---- set color [$self look bg] set scaled [expr {$@value*($l-1)/$span}] + set thick [expr $@knob_thick/2] if {$@orient} { + set y1 [expr $y1+$@knob_thick] set y [expr $y1+$@h-$scaled-2] set coords [list [expr $x1+2] $y [expr $x1+$@w-2] [expr $y-2]] } else { + set x2 [expr $x1-$@knob_thick] set x [expr $x1+$scaled] ! set coords [list $x [expr $y1+$thick] [expr $x+2] [expr $y1+$@h-$thick]] } $self item KNOB rectangle $coords -outline red -fill [darker $color]