studio icon indicating copy to clipboard operation
studio copied to clipboard

LVGL flow: anim time/speed style property

Open fietser28 opened this issue 2 years ago • 0 comments

Not major (workaround is included below): Add the animation time/speed property to widgets editor in where this is applicable. Practical use case is to stop the cursor from blinking in textarea.

There is a workaround available:

Create a action with the following code (in actions.c):

void action_text_area_disable_blink(lv_event_t * e) {
    lv_obj_t *textarea = lv_event_get_target(e);
    if (lv_obj_check_type(textarea, &lv_textarea_class)) {
        lv_obj_set_style_anim_time(textarea, 0, LV_PART_CURSOR | LV_STATE_FOCUSED);
        lv_obj_refresh_style(textarea, LV_PART_CURSOR, LV_STYLE_PROP_ANY);
    }
};

Attach this action with on FOCUSSED to the widget you want to change: image

fietser28 avatar Dec 26 '22 13:12 fietser28