From 062cfdcc1b213d5cecd907a367dee51046e2eb7b Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 11 May 2014 05:40:27 +1000 Subject: Add a rectangle to pad out those that don't use the winFang box, and have them make their widdgets relative to that. --- src/GuiLua/GuiLua.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/GuiLua') diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index 09c3fe9..2e16927 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c @@ -175,10 +175,13 @@ static int widget(lua_State *L) winFang *win = NULL; char *type = "button"; char *title = ":"; - int x = 1, y = 1, w = WIDTH/3, h = HEIGHT/3; + int x = 1, y = 1, w = WIDTH/3, h = HEIGHT/3, cy; pull_lua(L, 1, "*window $type $title %x %y %w %h", &win, &type, &title, &x, &y, &w, &h); + evas_object_geometry_get(win->content, NULL, &cy, NULL, NULL); + y += cy; + // Poor mans introspection, until I write real introspection into EFL. // TODO - The alternative is to just lookup the ELM_*_CLASS in a hash table? if (strcmp(type, "button") == 0) -- cgit v1.1