From ec0caa569b356f186e87c13e50550ca1b807dde6 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 4 Sep 2022 18:16:20 +0200 Subject: eve support when i2s is running --- fw/fe310/eos/eve/widget/strw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fw/fe310/eos/eve/widget/strw.c') diff --git a/fw/fe310/eos/eve/widget/strw.c b/fw/fe310/eos/eve/widget/strw.c index ae9ccab..6bddbe9 100644 --- a/fw/fe310/eos/eve/widget/strw.c +++ b/fw/fe310/eos/eve/widget/strw.c @@ -81,7 +81,7 @@ void eve_strw_destroy(EVEWidget *_widget) { eve_free(widget->str); } -static void set_focus(EVEStrWidget *widget) { +static void show_rect(EVEStrWidget *widget) { EVEWidget *_widget = &widget->w; EVERect focus; @@ -89,7 +89,7 @@ static void set_focus(EVEStrWidget *widget) { focus.y = _widget->g.y; focus.w = _widget->g.w; focus.h = 2 * widget->font->h; - eve_widget_set_focus(_widget, &focus); + eve_page_show_rect(_widget->page, &focus); } static EVEStrCursor *cursor_prox(EVEStrWidget *widget, EVEStrCursor *cursor, EVETouch *touch, short *dx) { @@ -282,7 +282,7 @@ int eve_strw_touch(EVEWidget *_widget, EVETouch *touch, uint16_t evt) { if ((evt & EVE_TOUCH_ETYPE_POINT_UP) && !(touch->eevt & (EVE_TOUCH_EETYPE_TRACK_XY | EVE_TOUCH_EETYPE_ABORT | EVE_TOUCH_EETYPE_LPRESS))) { eve_strw_cursor_set(widget, &widget->cursor1, eve_page_x(page, touch->x0)); if (widget->cursor2.on) eve_strw_cursor_clear(widget, &widget->cursor2); - set_focus(widget); + show_rect(widget); ret = 1; } } @@ -293,7 +293,6 @@ int eve_strw_touch(EVEWidget *_widget, EVETouch *touch, uint16_t evt) { widget->track.dx = 0; } - if (ret) eve_widget_set_focus(_widget, NULL); return ret; } -- cgit v1.2.3