# HG changeset patch # User viric@llimona # Date 1161677881 -7200 # Node ID f8ce867298a9fd56e0f4d1c014f33edff947ca4f # Parent 2bdd3f8b7864e0e03ec45401a7ee6bf8001d173c Fixed the behaviour for refining the points. diff -r 2bdd3f8b7864 -r f8ce867298a9 gamma.tk --- a/gamma.tk Mon Oct 23 00:35:20 2006 +0200 +++ b/gamma.tk Tue Oct 24 10:18:01 2006 +0200 @@ -140,12 +140,12 @@ set xmax [lindex [lindex $points [expr {$icolors + 1}]] 0] set nxmin $xmin set nxmax $xmax - prepare_colors $type $nxmin $nxmax + prepare_colors_center $type $nxmin $nxmax + prepare_colors_margins $type $nxmin $nxmax } -proc prepare_colors { type nxmin nxmax } { - global gradient +proc prepare_colors_margins { type nxmin nxmax } { switch -- $type { r { set cmin [color $nxmin 0 0] @@ -163,6 +163,10 @@ # Set the bg and fg color to xmin and xmax .leftcol.c configure -background $cmin -foreground $cmax .rightcol.c configure -background $cmin -foreground $cmax +} + +proc prepare_colors_center { type nxmin nxmax } { + global gradient # Prepare the colors of the middle buttons for {set i 0} {$i < $gradient} {incr i} { @@ -197,7 +201,7 @@ if {[expr {$nxmax - $nxmin}] > $th_prec} { puts "$type - More precision needed" - prepare_colors $type $nxmin $nxmax + prepare_colors_center $type $nxmin $nxmax } else { puts "$type - New point!"