diff --git a/src/draw.c b/src/draw.c index 7bdf7820..d9e048ef 100644 --- a/src/draw.c +++ b/src/draw.c @@ -3577,7 +3577,7 @@ static void draw_graph_variables(int wcnt, int wave_color, int n_nodes, int swee dbg(1, "%g %g %s\n", xt, yt, tmpstr); my_snprintf(tmpstr, S(tmpstr), "%s", str_replace(tmpstr, "\\ ", " ", 0, -1)); draw_string(wave_color, NOW, tmpstr, 0, 0, 0, 0, - xt, yt, gr->txtsizey * gr->magy * 0.5, gr->txtsizey * gr->magy * 0.5); + xt, yt, gr->txtsizey * gr->magy * 0.4, gr->txtsizey * gr->magy * 0.4); #if HAS_CAIRO == 1 if(gr->hilight_wave == wcnt) { xctx->cairo_font = @@ -3722,7 +3722,7 @@ static void show_node_measures(int measure_p, double measure_x, double measure_p } #endif draw_string(wave_color, NOW, str, 0, 0, 0, 0, - xt, yt, gr->txtsizey * gr->magy * 0.5, gr->txtsizey * gr->magy * 0.5); + xt, yt, gr->txtsizey * gr->magy * 0.4, gr->txtsizey * gr->magy * 0.4); #if HAS_CAIRO == 1 if(gr->hilight_wave == wcnt) { xctx->cairo_font = diff --git a/src/xschem.tcl b/src/xschem.tcl index 8054dfa3..48ef34d9 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -3174,9 +3174,14 @@ proc touches {sel tag} { } proc set_graph_default_colors {} { - global graph_selected graph_schname + global graph_selected graph_schname cadlayers if { [xschem get schname] ne $graph_schname } return - xschem setprop -fast rect 2 $graph_selected color "4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21" + set n_nodes [xschem count_items [xschem getprop rect 2 $graph_selected node] "\n" \"] + set color {} + for {set i 0} {$i < $n_nodes} { incr i} { + append color [expr {$i%($cadlayers - 4) + 4}] { } + } + xschem setprop -fast rect 2 $graph_selected color $color graph_update_nodelist xschem draw_graph $graph_selected }