1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

minor group related fixes

This commit is contained in:
Gabor Kiss-Vamosi 2020-04-09 12:25:50 +02:00
parent 0dc8ecaf26
commit 2f6a1ca8bf
4 changed files with 9 additions and 1 deletions

View File

@ -153,6 +153,8 @@ void lv_group_remove_obj(lv_obj_t * obj)
/*Focus on the next object*/
if(*g->obj_focus == obj) {
if(g->frozen) g->frozen = 0;
/*If this is the only object in the group then focus to nothing.*/
if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) {
(*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);

View File

@ -160,6 +160,7 @@ void lv_indev_reset(lv_indev_t * indev, lv_obj_t * obj)
{
if(indev) {
indev->proc.reset_query = 1;
if(indev_act == indev) indev_obj_act = NULL;
if(obj == NULL || indev->proc.types.pointer.last_pressed == obj) {
indev->proc.types.pointer.last_pressed = NULL;
}
@ -168,6 +169,7 @@ void lv_indev_reset(lv_indev_t * indev, lv_obj_t * obj)
lv_indev_t * i = lv_indev_get_next(NULL);
while(i) {
i->proc.reset_query = 1;
if(indev_act == i) indev_obj_act = NULL;
if(obj == NULL || i->proc.types.pointer.last_pressed == obj) {
i->proc.types.pointer.last_pressed = NULL;
}

View File

@ -1071,7 +1071,7 @@ void lv_theme_material_apply(lv_obj_t * obj, lv_theme_style_t name)
case LV_THEME_MSGBOX_BTNS:
lv_obj_clean_style_list(obj, LV_MSGBOX_PART_BTN_BG);
list = lv_obj_get_style_list(obj, LV_MSGBOX_PART_BTN_BG);
lv_style_list_add_style(list, &pad_inner);
lv_style_list_add_style(list, &pad_small);
lv_obj_clean_style_list(obj, LV_MSGBOX_PART_BTN);
list = lv_obj_get_style_list(obj, LV_MSGBOX_PART_BTN);

View File

@ -156,6 +156,10 @@ void lv_msgbox_add_btns(lv_obj_t * mbox, const char * btn_map[])
lv_btnmatrix_set_btn_ctrl_all(ext->btnm, LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_NO_REPEAT);
lv_obj_set_event_cb(ext->btnm, lv_msgbox_btnm_event_cb);
if(lv_obj_is_focused(mbox)) {
lv_btnmatrix_set_focused_btn(ext->btnm, 0);
}
mbox_realign(mbox);
}