[Lemon-commits] [lemon_svn] hegyi: r2960 - glemon/trunk
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 21:51:29 CET 2006
Author: hegyi
Date: Thu Sep 28 11:26:48 2006
New Revision: 2960
Modified:
glemon/trunk/graph_displayer_canvas-node.cc
glemon/trunk/main_win.cc
Log:
Small modification in node view settings.
Modified: glemon/trunk/graph_displayer_canvas-node.cc
==============================================================================
--- glemon/trunk/graph_displayer_canvas-node.cc (original)
+++ glemon/trunk/graph_displayer_canvas-node.cc Thu Sep 28 11:26:48 2006
@@ -1,6 +1,7 @@
#include "graph_displayer_canvas.h"
#include <cmath>
+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;
Modified: glemon/trunk/main_win.cc
==============================================================================
--- glemon/trunk/main_win.cc (original)
+++ glemon/trunk/main_win.cc Thu Sep 28 11:26:48 2006
@@ -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));
More information about the Lemon-commits
mailing list