summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Port.cpp12
-rw-r--r--src/module.c10
-rw-r--r--src/port.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/Port.cpp b/src/Port.cpp
index aab9766..2ecbf36 100644
--- a/src/Port.cpp
+++ b/src/Port.cpp
@@ -37,12 +37,12 @@ Port::Port(Module& module,
bool is_input,
uint32_t color)
: Box(module.canvas(),
- GANV_BOX(
- ganv_port_new(module.gobj(), is_input,
- "fill-color", color,
- "border-color", highlight_color(color, 0x20),
- "label", name.c_str(),
- NULL)))
+ GANV_BOX(ganv_port_new(module.gobj(), is_input,
+ "fill-color", color,
+ "border-color", highlight_color(color, 0x20),
+ "border-width", 2.0,
+ "label", name.c_str(),
+ NULL)))
{
g_signal_connect(gobj(), "value-changed",
G_CALLBACK(on_value_changed), this);
diff --git a/src/module.c b/src/module.c
index f700912..654dbe5 100644
--- a/src/module.c
+++ b/src/module.c
@@ -178,7 +178,7 @@ measure(GanvModule* module, Metrics* m)
const unsigned hor_ports = MAX(1, MAX(n_inputs, n_outputs));
const double ports_width = (2 * EDGE_PAD) +
((m->input_width) * hor_ports) +
- (PAD * (hor_ports - 1));
+ ((PAD + 1.0) * (hor_ports - 1));
m->width = MAX(contents_width, ports_width);
m->width = MAX(m->width, impl->embed_width);
@@ -310,7 +310,7 @@ resize_right(GanvModule* module)
pnode->impl->border_width) / 2.0;
if (p->impl->is_input) {
- y = header_height + (i * (h + 2.0));
+ y = header_height + (i * (h + pnode->impl->border_width + 1.0));
++i;
ganv_node_move_to(pnode, -border_off, y);
ganv_box_set_width(pbox, m.input_width);
@@ -321,7 +321,7 @@ resize_right(GanvModule* module)
(GanvEdgeFunc)ganv_edge_update_location, NULL);
} else {
if (!m.horiz || !last_was_input) {
- y = header_height + (i * (h + 2.0));
+ y = header_height + (i * (h + pnode->impl->border_width + 1.0));
++i;
}
ganv_node_move_to(pnode, m.width - m.output_width + border_off, y);
@@ -389,13 +389,13 @@ resize_down(GanvModule* module)
pnode->impl->border_width) / 2.0;
if (p->impl->is_input) {
- in_x = EDGE_PAD + (in_count++ * (port_breadth + PAD));
+ in_x = EDGE_PAD + (in_count++ * (port_breadth + PAD + 1.0));
ganv_node_move_to(pnode, in_x, -border_off);
ganv_canvas_for_each_edge_to(
canvas, pnode,
(GanvEdgeFunc)ganv_edge_update_location, NULL);
} else {
- out_x = EDGE_PAD + (out_count++ * (port_breadth + PAD));
+ out_x = EDGE_PAD + (out_count++ * (port_breadth + PAD + 1.0));
ganv_node_move_to(pnode, out_x, height - port_depth + border_off);
ganv_canvas_for_each_edge_from(
canvas, pnode,
diff --git a/src/port.c b/src/port.c
index 8411a11..108dc45 100644
--- a/src/port.c
+++ b/src/port.c
@@ -443,7 +443,7 @@ ganv_port_new(GanvModule* module,
node->impl->can_tail = !is_input;
node->impl->can_head = is_input;
node->impl->draggable = FALSE;
- node->impl->border_width = 1.0;
+ node->impl->border_width = 2.0;
GanvCanvas* canvas = ganv_item_get_canvas(GANV_ITEM(port));
ganv_port_set_direction(port, ganv_canvas_get_direction(canvas));
@@ -500,7 +500,7 @@ ganv_port_show_control(GanvPort* port)
"y2", ganv_box_get_height(&port->box),
"fill-color", color,
"border-color", color,
- "border-width", 0.0,//node->impl->border_width,
+ "border-width", 0.0,
"managed", TRUE,
NULL));
ganv_item_show(GANV_ITEM(control->rect));