diff options
author | David Robillard <d@drobilla.net> | 2011-12-08 02:13:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-08 02:13:47 +0000 |
commit | 7e11058ba3b1b8339441c9559d36a938f1ecfdc0 (patch) | |
tree | 3d4e815fda7d994ba5093da47875c761bc7dba77 /src/module.c | |
parent | 3cd19961949ebcd69172e184f004427cfb59d5bf (diff) | |
download | ganv-7e11058ba3b1b8339441c9559d36a938f1ecfdc0.tar.gz ganv-7e11058ba3b1b8339441c9559d36a938f1ecfdc0.tar.bz2 ganv-7e11058ba3b1b8339441c9559d36a938f1ecfdc0.zip |
Make canvas direction a property.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3835 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/module.c')
-rw-r--r-- | src/module.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/module.c b/src/module.c index cc8269e..2f0fa20 100644 --- a/src/module.c +++ b/src/module.c @@ -168,7 +168,7 @@ measure(GanvModule* module, Metrics* m) GanvDirection direction = canvas->direction; - if (direction == GANV_VERTICAL) { + if (direction == GANV_DIRECTION_DOWN) { static const double PAD = 2.0; double contents_width = PAD; @@ -257,7 +257,7 @@ place_title(GanvModule* module, GanvDirection dir) if (!canvas_title) { return; - } else if (dir == GANV_HORIZONTAL) { + } else if (dir == GANV_DIRECTION_RIGHT) { if (module->icon_box) { gnome_canvas_item_set(GNOME_CANVAS_ITEM(canvas_title), "x", MODULE_ICON_SIZE + 1.0, @@ -353,7 +353,7 @@ resize_horiz(GanvModule* module) ganv_box_set_height(&module->box, height); - place_title(module, GANV_HORIZONTAL); + place_title(module, GANV_DIRECTION_RIGHT); } static void @@ -418,7 +418,7 @@ resize_vert(GanvModule* module) ganv_box_set_width(GANV_BOX(module), m.width); ganv_box_set_height(GANV_BOX(module), height); - place_title(module, GANV_VERTICAL); + place_title(module, GANV_DIRECTION_DOWN); } static void @@ -466,10 +466,10 @@ layout(GanvNode* self) } switch (canvas->direction) { - case GANV_HORIZONTAL: + case GANV_DIRECTION_RIGHT: resize_horiz(module); break; - case GANV_VERTICAL: + case GANV_DIRECTION_DOWN: resize_vert(module); break; } |