How to move the label in an image button


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

ESP32 Espressif toolchain

What LVGL version are you using?


What do you want to achieve?

I would like to make the label of an image button bigger, and move its center position

What have you tried so far?

I have tried to applied the code for label positioning but looks like in the image button, those rules do not apply entirely

Code to reproduce

The code block(s) should be formatted like:

lv_obj_t * imgbtn1 = lv_imgbtn_create(lv_scr_act(), NULL);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_RELEASED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_PRESSED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_CHECKED_RELEASED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_CHECKED_PRESSED, &icon_dinroom);
  lv_imgbtn_set_checkable(imgbtn1, true);
  // lv_obj_add_style(imgbtn1, LV_IMGBTN_PART_MAIN, &style);
  lv_obj_align(imgbtn1, NULL, LV_ALIGN_CENTER, 0, -10);

  /*Create a label on the Image button*/
  lv_obj_t * label_b1 = lv_label_create(imgbt1, NULL);
  lv_label_set_recolor(label_b1, true);
  lv_label_set_text(label_b1, "#ffffff Dining room#");
  lv_obj_align(label_b1, NULL, LV_ALIGN_CENTER, 0, 0);
  lv_obj_set_width(label_b1, 250);

The expectation should be see a larger text label but it keeps its parent width