diff options
Diffstat (limited to 'tests/cmap.tcl')
-rw-r--r-- | tests/cmap.tcl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/cmap.tcl b/tests/cmap.tcl index cca4c24..2e65a1f 100644 --- a/tests/cmap.tcl +++ b/tests/cmap.tcl @@ -2,7 +2,7 @@ # property. It is part of the Tk visual test suite, which is invoked # via the "visual" script. -catch {destroy .t} +destroy .t toplevel .t -colormap new wm title .t "Visual Test for Colormaps" wm iconname .t "Colormaps" @@ -17,9 +17,9 @@ proc colors {w redInc greenInc blueInc} { set blue 0 for {set y 0} {$y < 8} {incr y} { for {set x 0} {$x < 8} {incr x} { - frame $w.f$x,$y -width 40 -height 40 -bd 2 -relief raised \ - -bg [format #%02x%02x%02x $red $green $blue] - place $w.f$x,$y -x [expr 40*$x] -y [expr 40*$y] + frame $w.f$x,$y -width 40 -height 40 -borderwidth 2 -relief raised \ + -background [format "#%02x%02x%02x" $red $green $blue] + place $w.f$x,$y -x [expr {40 * $x}] -y [expr {40 * $y}] incr red $redInc incr green $greenInc incr blue $blueInc @@ -33,16 +33,16 @@ pack .t.m -side top -fill x button .t.quit -text Quit -command {destroy .t} pack .t.quit -side bottom -pady 3 -ipadx 4 -ipady 2 -frame .t.f -width 700 -height 450 -relief raised -bd 2 +frame .t.f -width 700 -height 450 -relief raised -borderwidth 2 pack .t.f -side top -padx 1c -pady 1c colors .t.f 4 0 0 -frame .t.f.f -width 350 -height 350 -colormap new -bd 2 -relief raised +frame .t.f.f -width 350 -height 350 -colormap new -borderwidth 2 -relief raised place .t.f.f -relx 1.0 -rely 0 -anchor ne colors .t.f.f 0 4 0 bind .t.f.f <Enter> {wm colormapwindows .t {.t.f.f .t}} bind .t.f.f <Leave> {wm colormapwindows .t {.t .t.f.f}} -catch {destroy .t2} +destroy .t2 toplevel .t2 wm title .t2 "Visual Test for Colormaps" wm iconname .t2 "Colormaps" |