Thanks @embeddedt for the suggestion. My status bar is made up of two containers that each consume half the screen. A style is applied to them to have a bottom border, which is seemless across the screen when they are aligned.
I can confirm the containers are spanning half the screen and in the right place (evidence is the grey bar across the screen). Which must mean the icons are left aligned, not right. Additonaly, when the icons appear / disappear they re-align left, not right.
I have tried as you suggested, and no changes ocurred.
Below is the full left and right container code, when appropriate I use to show and hide icons.
if(_status.sdCardPresent){
lv_label_set_text(sd, LV_SYMBOL_SD_CARD);
} else {
lv_label_set_text(sd, "");
}
DEBUG_DISPLAY("Setup status bar");
static lv_style_t statusStyle;
lv_style_init(&statusStyle);
/*Set a background color and a radius*/
lv_style_set_radius(&statusStyle, LV_STATE_DEFAULT, 0);
/*Add border to the bottom+right*/
lv_style_set_border_color(&statusStyle, LV_STATE_DEFAULT, LV_COLOR_BLACK);
lv_style_set_border_width(&statusStyle, LV_STATE_DEFAULT, 2);
lv_style_set_border_opa(&statusStyle, LV_STATE_DEFAULT, LV_OPA_50);
lv_style_set_border_side(&statusStyle, LV_STATE_DEFAULT, LV_BORDER_SIDE_BOTTOM);
lv_style_set_pad_right(&statusStyle, LV_STATE_DEFAULT, 4);
lv_style_set_pad_inner(&statusStyle, LV_STATE_DEFAULT, 4);
lv_style_set_pad_top(&statusStyle, LV_STATE_DEFAULT, 2);
statusLeft = lv_cont_create(lv_scr_act(), NULL);
lv_obj_add_style(statusLeft, LV_OBJ_PART_MAIN, &statusStyle);
lv_obj_set_height(statusLeft, STATUS_BAR_HEIGHT);
lv_obj_set_width(statusLeft, LV_HOR_RES/2);
lv_obj_align(statusLeft, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); /*This parametrs will be used when realigned*/
lv_cont_set_fit(statusLeft, LV_FIT_NONE); // We want our container to be static. We want to align our buttons
time = lv_label_create(statusLeft, NULL);
lv_label_set_text(time, "");
lv_obj_align_origo(time, statusLeft, LV_ALIGN_IN_LEFT_MID, 4, 0);
statusRight = lv_cont_create(lv_scr_act(), NULL);
lv_obj_add_style(statusRight, LV_OBJ_PART_MAIN, &statusStyle);
lv_obj_set_height(statusRight, STATUS_BAR_HEIGHT);
lv_obj_set_width(statusRight, LV_HOR_RES/2);
lv_cont_set_fit(statusRight, LV_FIT_NONE); // We want our container to be static. We want to align our buttons
lv_obj_set_base_dir(statusRight, LV_BIDI_DIR_RTL);
lv_cont_set_layout(statusRight, LV_LAYOUT_ROW_TOP);
lv_obj_align(statusRight, statusLeft, LV_ALIGN_OUT_RIGHT_TOP, 0, 0); /*This parametrs will be used when realigned*/
static lv_style_t iconStyle;
lv_style_init(&iconStyle);
lv_style_set_text_font(&iconStyle,LV_STATE_DEFAULT, LV_THEME_DEFAULT_FONT_TITLE);
charge = lv_label_create(statusRight, NULL);
lv_label_set_text(charge, "");
// lv_obj_align_origo(charge, statusRight, LV_ALIGN_IN_RIGHT_MID, -30, -3);
lv_obj_add_style(charge, LV_OBJ_PART_MAIN, &iconStyle);
sd = lv_label_create(statusRight, NULL);
lv_label_set_text(sd,"");
// lv_obj_align_origo(sd, statusRight, LV_ALIGN_IN_RIGHT_MID, -50, -3);
lv_obj_add_style(sd, LV_OBJ_PART_MAIN, &iconStyle);
usb = lv_label_create(statusRight, NULL);
lv_label_set_text(usb,"");
// lv_obj_align_origo(usb, statusRight, LV_ALIGN_IN_RIGHT_MID, -80, -3);
lv_obj_add_style(usb, LV_OBJ_PART_MAIN, &iconStyle);
eth = lv_label_create(statusRight, NULL);
lv_label_set_text(eth,"");
// lv_obj_align_origo(eth, statusRight, LV_ALIGN_IN_RIGHT_MID, -110, -3);
lv_obj_add_style(eth, LV_OBJ_PART_MAIN, &iconStyle);
wifi = lv_label_create(statusRight, NULL);
lv_label_set_text(wifi,"");
// lv_obj_align_origo(wifi, statusRight, LV_ALIGN_IN_RIGHT_MID, -140, -3);
lv_obj_add_style(wifi, LV_OBJ_PART_MAIN, &iconStyle);