Fixed the behaviour for refining the points.
--- 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!"