lv_tabview: realaign the tabview on every new tab

This commit is contained in:
Gabor Kiss-Vamosi
2019-04-19 06:40:06 +02:00
parent 5d65def464
commit a983dfa80a

View File

@@ -308,9 +308,10 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name)
/*Set the first btn as active*/
if(ext->tab_cnt == 1) {
ext->tab_cur = 0;
tabview_realign(tabview); /*To set the proper btns height*/
}
tabview_realign(tabview); /*Set the size of the pages, tab buttons and indicator*/
lv_tabview_set_tab_act(tabview, ext->tab_cur, false);
return h;