# HG changeset patch # User hegyi # Date 1159435608 0 # Node ID 74065e83844d9995799c809d299dbabf00a5cc66 # Parent 65c1b103443de169bc37b831c45c1b69e35948e9 Small modification in node view settings. diff -r 65c1b103443d -r 74065e83844d graph_displayer_canvas-node.cc --- a/graph_displayer_canvas-node.cc Mon Sep 25 15:30:04 2006 +0000 +++ b/graph_displayer_canvas-node.cc Thu Sep 28 09:26:48 2006 +0000 @@ -1,6 +1,7 @@ #include "graph_displayer_canvas.h" #include +const int minimum_node_radius=0; int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Node node) { @@ -24,13 +25,19 @@ } else { - w=(int)(radius_min+(v-min)/(max-min)*(radius_max-radius_min)); + w=(int)(minimum_node_radius+(v-min)/(max-min)*(radius_max-minimum_node_radius)); } } else { - w=5+(int)(v/radius_unit); + w=(int)(v*radius_max); } + + if(w<5) + { + w=5; + } + if(w>=0) { double x1, y1, x2, y2; diff -r 65c1b103443d -r 74065e83844d main_win.cc --- a/main_win.cc Mon Sep 25 15:30:04 2006 +0000 +++ b/main_win.cc Thu Sep 28 09:26:48 2006 +0000 @@ -210,27 +210,27 @@ table2.attach(*auto_scale, 0,2,0,1); Gtk::Label * unit_label= new Gtk::Label("Unit:"); - table2.attach(*unit_label, 2,3,0,1); +// table2.attach(*unit_label, 2,3,0,1); Gtk::Adjustment * adjustment_unit=new Gtk::Adjustment(20, 5, 200, 5, 10); radius_unit = new Gtk::SpinButton(*adjustment_unit, 5,0); radius_unit->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); - table2.attach(*radius_unit, 3,4,0,1); +// table2.attach(*radius_unit, 3,4,0,1); Gtk::Label * min_label= new Gtk::Label("Min:"); - table2.attach(*min_label, 0,1,1,2); +// table2.attach(*min_label, 0,1,1,2); Gtk::Adjustment * adjustment_min=new Gtk::Adjustment(20, 5, 200, 5, 10); radius_min = new Gtk::SpinButton(*adjustment_min, 5,0); radius_min->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged)); - table2.attach(*radius_min, 1,2,1,2); +// table2.attach(*radius_min, 1,2,1,2); - Gtk::Label * max_label= new Gtk::Label("Max:"); + Gtk::Label * max_label= new Gtk::Label("Size:"); table2.attach(*max_label, 2,3,1,2); - Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 5, 200, 5, 10); + Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 0, 200, 5, 10); radius_max = new Gtk::SpinButton(*adjustment_max, 5,0); radius_max->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));