chore(tabview) fix format - (run python script this time!)

This commit is contained in:
pete-pjb
2022-06-13 13:07:49 +01:00
parent 3e56e96922
commit 60ebd25d3d
2 changed files with 6 additions and 6 deletions

View File

@@ -121,17 +121,17 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
return page;
}
void lv_tabview_rename_tab(lv_obj_t *obj, uint32_t id, const char * new_name)
void lv_tabview_rename_tab(lv_obj_t * obj, uint32_t id, const char * new_name)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_tabview_t * tabview = (lv_tabview_t *)obj;
if(id >= tabview->tab_cnt) return;
if( tabview->tab_pos & LV_DIR_HOR ) id *= 2;
if(tabview->tab_pos & LV_DIR_HOR) id *= 2;
lv_mem_free( tabview->map[id] );
tabview->map[id] = lv_mem_alloc(strlen( new_name )+1 );
strcpy( tabview->map[id], new_name );
lv_mem_free(tabview->map[id]);
tabview->map[id] = lv_mem_alloc(strlen(new_name) + 1);
strcpy(tabview->map[id], new_name);
lv_obj_invalidate(obj);
}

View File

@@ -42,7 +42,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * parent, lv_dir_t tab_pos, lv_coord_t tab
lv_obj_t * lv_tabview_add_tab(lv_obj_t * tv, const char * name);
void lv_tabview_rename_tab(lv_obj_t *obj, uint32_t tab_id, const char * new_name);
void lv_tabview_rename_tab(lv_obj_t * obj, uint32_t tab_id, const char * new_name);
lv_obj_t * lv_tabview_get_content(lv_obj_t * tv);