summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/app
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-03-23 21:33:57 +0100
committerUros Majstorovic <majstor@majstor.org>2021-03-23 21:33:57 +0100
commit8c61343677d2ed8f929372863016524707b8ab93 (patch)
tree59f2c65f006bcf20c0b9a6a73c53a100d08775a2 /fw/fe310/eos/app
parent98941cdc89d93f5387bb98a443f06408321acc8f (diff)
form scroll completed
Diffstat (limited to 'fw/fe310/eos/app')
-rw-r--r--fw/fe310/eos/app/app_form.c1
-rw-r--r--fw/fe310/eos/app/app_screen.c4
-rw-r--r--fw/fe310/eos/app/app_status.c4
-rw-r--r--fw/fe310/eos/app/app_status.h4
4 files changed, 7 insertions, 6 deletions
diff --git a/fw/fe310/eos/app/app_form.c b/fw/fe310/eos/app/app_form.c
index ffb416b..c7056e0 100644
--- a/fw/fe310/eos/app/app_form.c
+++ b/fw/fe310/eos/app/app_form.c
@@ -74,6 +74,7 @@ EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, EVEWidgetSpec s
}
eve_label_init(label, &spec[i].label.g, _font, spec[i].label.title);
eve_widget_set_label(widget, label);
+ if (label->g.w == 0) label->g.w = eve_font_str_w(_font, label->title);
}
if (widget->label && (widget->label->g.w == 0)) eve_font_str_w(label->font, label->title) + APP_LABEL_MARGIN;
if (widget->g.w == 0) widget->g.w = APP_SCREEN_W - (widget->label ? widget->label->g.w : 0);
diff --git a/fw/fe310/eos/app/app_screen.c b/fw/fe310/eos/app/app_screen.c
index f94e477..9f3a236 100644
--- a/fw/fe310/eos/app/app_screen.c
+++ b/fw/fe310/eos/app/app_screen.c
@@ -31,10 +31,10 @@ EVEScreen *app_screen(void) {
return &screen;
}
-static int kbd_touch(EVEView *v, uint8_t tag0, int touch_idx) {
+static int kbd_touch(EVEView *v, EVETouch *touch, uint16_t evt, uint8_t tag0) {
EVEKbd *kbd = v->param;
- return eve_kbd_touch(kbd, tag0, touch_idx);
+ return eve_kbd_touch(kbd, touch, evt, tag0);
}
static uint8_t kbd_draw(EVEView *v, uint8_t tag0) {
diff --git a/fw/fe310/eos/app/app_status.c b/fw/fe310/eos/app/app_status.c
index 3ebfba9..3fdb45a 100644
--- a/fw/fe310/eos/app/app_status.c
+++ b/fw/fe310/eos/app/app_status.c
@@ -11,10 +11,10 @@
#include "app_status.h"
-int app_status_touch(EVEView *v, uint8_t tag0, int touch_idx) {
+int app_status_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0) {
return 0;
}
-uint8_t app_status_draw(EVEView *v, uint8_t tag0) {
+uint8_t app_status_draw(EVEView *view, uint8_t tag0) {
return tag0;
}
diff --git a/fw/fe310/eos/app/app_status.h b/fw/fe310/eos/app/app_status.h
index a121b13..9b2ac66 100644
--- a/fw/fe310/eos/app/app_status.h
+++ b/fw/fe310/eos/app/app_status.h
@@ -1,4 +1,4 @@
#include <stdint.h>
-int app_status_touch(EVEView *v, uint8_t tag0, int touch_idx);
-uint8_t app_status_draw(EVEView *v, uint8_t tag0);
+int app_status_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0);
+uint8_t app_status_draw(EVEView *view, uint8_t tag0);