Skip to content

Commit

Permalink
fix(msgbox) prevent the buttons being wider than the msbgox
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Sep 24, 2021
1 parent 5240fdd commit 73e036b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/extra/widgets/msgbox/lv_msgbox.c
Expand Up @@ -128,6 +128,7 @@ lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char *
const lv_font_t * font = lv_obj_get_style_text_font(mbox->btns, LV_PART_ITEMS);
lv_coord_t btn_h = lv_font_get_line_height(font) + LV_DPI_DEF / 10;
lv_obj_set_size(mbox->btns, btn_cnt * (2 * LV_DPI_DEF / 3), btn_h);
lv_obj_set_style_max_width(mbox->btns, lv_pct(100), 0);
lv_obj_add_flag(mbox->btns, LV_OBJ_FLAG_EVENT_BUBBLE); /*To see the event directly on the message box*/
}

Expand Down

0 comments on commit 73e036b

Please sign in to comment.