Tabview, image not filling entire background


I would like to use an image as the background for tabview, filling out the entire tab, with no visible margins, padding, or scrollbar… just the image at the same size as display resolution. My attempts thus far have not yielded the desired results, any guidance would be appreciated.

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


What LVGL version are you using?


What have you tried so far?

I have tried deactivating the scrollbar and setting the pads and margins to 0

Code to reproduce

    tv = lv_tabview_create(lv_scr_act(), NULL);    

    lv_tabview_set_btns_pos(tv, LV_TABVIEW_TAB_POS_NONE);
    t1 = lv_tabview_add_tab(tv, "OscA");
    lv_page_set_scrl_width(t1, 0);

    lv_obj_set_style_local_pad_all(tv, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
    lv_obj_set_style_local_margin_all(tv, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);

    lv_obj_set_style_local_pad_all(t1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
    lv_obj_set_style_local_pad_all(t1, LV_TABVIEW_PART_BG, LV_STATE_DEFAULT, 0);
    lv_obj_set_style_local_pad_all(t1, LV_LIST_PART_SCROLLBAR, LV_STATE_DEFAULT, 0);

    lv_obj_set_style_local_margin_all(t1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
    lv_obj_set_style_local_margin_all(t1, LV_TABVIEW_PART_BG, LV_STATE_DEFAULT, 0);
    lv_obj_set_style_local_margin_all(t1, LV_LIST_PART_SCROLLBAR, LV_STATE_DEFAULT, 0);

    lv_obj_t* box = lv_obj_create(t1, NULL);
    lv_obj_set_size(box, 320, 240);
    lv_obj_set_click(box, false);

    lv_obj_t* icon;

    icon = lv_img_create(t1, NULL);
    lv_img_set_src(icon, &Mu_UI_bg);
    lv_obj_set_click(icon, false);

Screenshot and/or video


Please also attach Mu_UI_bg.

Mu_UI_bg.c (3.7 MB)

I was able to fill the display by resizing the image using: lv_img_set_zoom(); likely a case of operator error, rather than the codebase