diff --git a/src/themes/default/lv_theme_default.c b/src/themes/default/lv_theme_default.c index 5082bcab6a..864f8e2e9e 100644 --- a/src/themes/default/lv_theme_default.c +++ b/src/themes/default/lv_theme_default.c @@ -786,14 +786,16 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) #if LV_USE_TABVIEW lv_obj_t * parent = lv_obj_get_parent(obj); - if(parent && lv_obj_check_type(lv_obj_get_parent(parent), &lv_tabview_class)) { - lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); - lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_STATE_CHECKED); - lv_obj_add_style(obj, &theme->styles.tab_btn, LV_STATE_CHECKED); - lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &theme->styles.tab_bg_focus, LV_STATE_FOCUS_KEY); - return; + if(parent && lv_obj_get_index(parent) == 0) { /*Tabview header*/ + if(lv_obj_check_type(lv_obj_get_parent(parent), &lv_tabview_class)) { + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.tab_btn, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.tab_bg_focus, LV_STATE_FOCUS_KEY); + return; + } } #endif