From a6aba9a3e541b8f193e93c653bac7bbae111de17 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Jan 2014 00:31:10 +0000 Subject: Don't abuse show_label property for vertical/horizontal mode. Don't use g_object_get to get x and y coordinates of items. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5246 a436a847-0d15-0410-975c-d299462d15a1 --- src/port.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/port.c') diff --git a/src/port.c b/src/port.c index 616888e..29a7a10 100644 --- a/src/port.c +++ b/src/port.c @@ -127,7 +127,8 @@ ganv_port_draw(GanvItem* item, int cx, int cy, int width, int height) { - GanvPort* port = GANV_PORT(item); + GanvPort* port = GANV_PORT(item); + GanvCanvas* canvas = GANV_CANVAS(item->canvas); // Draw Box GanvItemClass* item_class = GANV_ITEM_CLASS(parent_class); @@ -138,7 +139,8 @@ ganv_port_draw(GanvItem* item, GANV_ITEM_GET_CLASS(rect)->draw(rect, cr, cx, cy, width, height); } - if (!GANV_NODE(port)->impl->show_label) { + if (canvas->direction == GANV_DIRECTION_DOWN || + !GANV_NODE(port)->impl->show_label) { return; } @@ -429,7 +431,6 @@ ganv_port_set_direction(GanvPort* port, box->impl->radius_bl = (is_input ? 4.0 : 0.0); break; } - ganv_node_set_show_label(node, direction == GANV_DIRECTION_RIGHT); ganv_node_resize(node); } -- cgit v1.2.1