aboutsummaryrefslogtreecommitdiff
path: root/apps/browser.c
diff options
context:
space:
mode:
authorMarvin Borner2020-11-29 22:17:41 +0100
committerMarvin Borner2020-11-29 22:17:41 +0100
commita80021fa96b07d4ae26d9f85099f4bce09a8f5b3 (patch)
treeb3a95aeb91d783de999e22cc825395957c511f23 /apps/browser.c
parentcb9816c78f25ecc8736cd97c11c839a4c18bcf76 (diff)
Big steps towards working window resizing
Found some other bugs too
Diffstat (limited to 'apps/browser.c')
-rw-r--r--apps/browser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/browser.c b/apps/browser.c
index ca2ab23..c7c303f 100644
--- a/apps/browser.c
+++ b/apps/browser.c
@@ -17,7 +17,6 @@
#define FONT_HEIGHT 24
#define LABEL_WIDTH 36 // Thx Lars
-static struct element *root;
static struct element *code_label;
static struct element *output;
@@ -101,15 +100,15 @@ void on_submit(void *event, struct element *box)
c->text = strdup("000");
c->color_fg = COLOR_RED;
}
- gui_sync(root, output);
- gui_sync(root, code_label);
+ gui_sync(output);
+ gui_sync(code_label);
net_close(socket);
}
int main()
{
// TODO: Dynamic element positioning
- root = gui_init("browser", WIDTH, HEIGHT, COLOR_BG);
+ struct element *root = gui_init("browser", WIDTH, HEIGHT, COLOR_BG);
code_label = gui_add_label(root, 0, 0, FONT_24, "000", COLOR_BLACK, COLOR_WHITE);
struct element *text_input =
gui_add_text_input(root, LABEL_WIDTH, 0, 100, FONT_24, COLOR_WHITE, COLOR_BLACK);