How to change background color of checked tab in tabview

Description: I’m able to change style of every part of tabview except the background color of the checked tab.

  1. I can change the font color of a checked tab, and the background color of a pressed tab.
  2. Setting a style to change the background color of a checked tab does not work as expected.
  3. Below is code showing styles to change font/background color. This line does not work: lv_style_set_bg_color(&style_toptabbtn, LV_STATE_CHECKED, lv_color_hex(MARS_COLOR_BLUE)); But a similar line to set the bg_color when LV_STATE_PRESSED does work.

What MCU/Processor/Board and compiler are you using?

What LVGL version are you using? v7.6.1

What do you want to achieve?

What have you tried so far? Everything I can think of.

Code to reproduce

/*
    lv_style_init(&style_toptab);
    //lv_style_set_bg_color(&style_toptab, LV_STATE_DEFAULT, LV_COLOR_WHITE);
    //lv_style_set_bg_color(&style_toptab, LV_STATE_DEFAULT, lv_color_hex(MARS_COLOR_BACKGROUND));      //this colors the whole background

    lv_style_init(&style_toptabbtn);
    lv_style_set_radius(&style_toptabbtn, LV_STATE_DEFAULT, 10);
    lv_style_set_text_font(&style_toptabbtn, LV_STATE_DEFAULT, &lv_font_montserrat_26);

    lv_style_set_border_width(&style_toptabbtn, LV_STATE_DEFAULT, 2);
    lv_style_set_border_color(&style_toptabbtn, LV_STATE_DEFAULT, lv_color_hex(MARS_COLOR_MEDGRAY));
    lv_style_set_border_side(&style_toptabbtn, LV_STATE_DEFAULT, LV_BORDER_SIDE_RIGHT | LV_BORDER_SIDE_LEFT);

    lv_style_set_text_font(&style_toptabbtn, LV_STATE_PRESSED, &font_montserrat_28B);
    lv_style_set_text_color(&style_toptabbtn, LV_STATE_PRESSED, lv_color_hex(MARS_COLOR_ORANGE));
    lv_style_set_bg_color(&style_toptabbtn, LV_STATE_PRESSED, lv_color_hex(MARS_COLOR_BLUE));

    lv_style_set_text_font(&style_toptabbtn, LV_STATE_CHECKED, &font_montserrat_28B);
    lv_style_set_text_color(&style_toptabbtn, LV_STATE_CHECKED, lv_color_hex(MARS_COLOR_ORANGE));
    lv_style_set_bg_color(&style_toptabbtn, LV_STATE_CHECKED, lv_color_hex(MARS_COLOR_BLUE));

    lv_style_init(&style_toptabindicator);
    lv_style_set_bg_color(&style_toptabindicator, LV_STATE_DEFAULT, lv_color_hex(MARS_COLOR_ORANGE));


//Elsewhere:
    lv_obj_add_style(tabview, LV_TABVIEW_PART_TAB_BG, &style_toptab);
    lv_obj_add_style(tabview, LV_TABVIEW_PART_TAB_BTN, &style_toptabbtn);
    lv_obj_add_style(tabview, LV_TABVIEW_PART_INDIC, &style_toptabindicator);
*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.