mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(obj) fix adding LV_STATE_FOCUS_KEY
This commit is contained in:
parent
e1e45b1de3
commit
9b067784ee
@ -663,7 +663,7 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
editing = lv_group_get_editing(lv_obj_get_group(obj));
|
||||
lv_state_t state = LV_STATE_FOCUSED;
|
||||
|
||||
lv_indev_t * indev = lv_event_get_param(e);
|
||||
lv_indev_t * indev = lv_indev_get_act();
|
||||
lv_indev_type_t indev_type = lv_indev_get_type(indev);
|
||||
if(indev_type == LV_INDEV_TYPE_KEYPAD || indev_type == LV_INDEV_TYPE_ENCODER) state |= LV_STATE_FOCUS_KEY;
|
||||
if(editing) {
|
||||
|
@ -663,7 +663,6 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
||||
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) {
|
||||
lv_obj_add_style(obj, &styles->msgbox_btns_bg, 0);
|
||||
lv_obj_add_style(obj, &styles->pad_gap, 0);
|
||||
lv_obj_add_style(obj, &styles->pad_tiny, 0);
|
||||
lv_obj_add_style(obj, &styles->btn, LV_PART_ITEMS);
|
||||
lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED);
|
||||
lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_ITEMS | LV_STATE_CHECKED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user