fix(theme) update the tabview's theme

Allow setting background color directly on the tabview
This commit is contained in:
Gabor Kiss-Vamosi
2021-04-18 00:55:11 +02:00
parent da367337c9
commit 511d9d8c50

View File

@@ -589,13 +589,10 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
lv_obj_t * parent = lv_obj_get_parent(obj);
/*Tabview content area*/
if(lv_obj_check_type(parent, &lv_tabview_class)) {
lv_obj_add_style(obj, &styles->bg_color_grey, 0);
lv_obj_add_style(obj, &styles->pad_gap, 0);
return;
}
/*Tabview pages*/
else if(lv_obj_check_type(lv_obj_get_parent(parent), &lv_tabview_class)) {
lv_obj_add_style(obj, &styles->scr, 0);
lv_obj_add_style(obj, &styles->pad_normal, 0);
lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR);
lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED);
@@ -915,6 +912,13 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
}
#endif
#if LV_USE_TABVIEW
if(lv_obj_check_type(obj, &lv_tabview_class)) {
lv_obj_add_style(obj, &styles->scr, 0);
return;
}
#endif
#if LV_USE_COLORWHEEL
else if(lv_obj_check_type(obj, &lv_colorwheel_class)) {
lv_obj_add_style(obj, &styles->colorwheel_main, 0);