diff options
author | David Robillard <d@drobilla.net> | 2014-01-03 00:31:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-03 00:31:10 +0000 |
commit | a6aba9a3e541b8f193e93c653bac7bbae111de17 (patch) | |
tree | d8f243e3432556706878441f563f8872088085ec /src/port.c | |
parent | 023925ef7ecf8314e51f2bb14717f88b92240438 (diff) | |
download | ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.gz ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.bz2 ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.zip |
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
Diffstat (limited to 'src/port.c')
-rw-r--r-- | src/port.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); } |