From d7bdbcf7e6881065200b21a02522a68cf4fb9881 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 24 Aug 2020 18:12:41 +0200 Subject: fixed bug in form constructor; free widget improved --- fw/fe310/eos/eve/screen/form.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'fw/fe310/eos/eve/screen/form.c') diff --git a/fw/fe310/eos/eve/screen/form.c b/fw/fe310/eos/eve/screen/form.c index 52cfdc6..5837a99 100644 --- a/fw/fe310/eos/eve/screen/form.c +++ b/fw/fe310/eos/eve/screen/form.c @@ -109,7 +109,7 @@ void eve_form_update_g(EVEPage *page, EVEWidget *_widget) { widget->label->g.x = 0; widget->label->g.y = h; } - if (w + widget->g.w >= form->p.v.window->g.w) { + if (w + widget->g.w > form->p.v.window->g.w) { h += _h; w = 0; _h = 0; @@ -123,3 +123,13 @@ void eve_form_update_g(EVEPage *page, EVEWidget *_widget) { widget = eve_widget_next(widget); } } + +EVEWidget *eve_form_widget(EVEForm *form, uint16_t idx) { + EVEWidget *w = form->widget; + int i; + + for (i=0; i