Distortion in the text

Perform all steps below and tick them with [x]

  • [x] Read the FAQ
  • [x] Check the related part of the Documentation
  • [8.0.1] Update lvgl to the latest version
  • [ ] Reproduce the issue in a Simulator

Describe the bug

Distortion in the text “Trip” in the obejct “GUIView_mainTripTextLabel”.
This distorition is caused by another object, “GUIView_mainIndicatorInfoBoxLabel”, which is drawn on the same line as the text label.

When the object “GUIView_mainIndicatorInfoBoxLabel” is hidden, the text “Trip” does not contain any distorition.

Ghanging the y alignment of GUIView_mainIndicatorInfoBox from 0 to -5 or the y alignement from GUIView_mainTripTextLabel from 222 to 227 also fixes the distortion in the text.

To Reproduce

// Create main body
GUIView_mainBodyBox = lv_obj_create(GUIView_mainScreen);
lv_obj_set_size(GUIView_mainBodyBox, 240, 274);
lv_obj_align(GUIView_mainBodyBox, LV_ALIGN_TOP_MID, 0, 28);
lv_obj_set_style_bg_opa(GUIView_mainBodyBox, LV_OPA_TRANSP, 0);   

// Create indicator info box, place holder for object showing indicator info
GUIView_mainIndicatorInfoBox = lv_obj_create(GUIView_mainBodyBox);
lv_obj_set_size(GUIView_mainIndicatorInfoBox, 120, 40);
lv_obj_align(GUIView_mainIndicatorInfoBox, LV_ALIGN_TOP_MID, 0, 187);
lv_obj_set_style_bg_opa(GUIView_mainIndicatorInfoBox, LV_OPA_TRANSP, 0);

//Create info box
GUIView_mainIndicatorInfoBox = lv_obj_create(GUIView_mainIndicatorInfoBox);
lv_obj_set_size(GUIView_mainIndicatorInfoBox, 60, 40);
lv_obj_align(GUIView_mainIndicatorInfoBox, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_style_bg_color(GUIView_mainIndicatorInfoBox, lv_color_hex(0x009995), 0);
lv_obj_set_style_bg_opa(GUIView_mainIndicatorInfoBox, LV_OPA_COVER, 0);

//Create label for displaying number in infobox
GUIView_mainIndicatorInfoBoxLabel = lv_label_create(GUIView_mainIndicatorInfoBox);
lv_obj_set_style_text_align(GUIView_mainIndicatorInfoBoxLabel, LV_ALIGN_CENTER, 0);
lv_obj_align(GUIView_mainIndicatorInfoBoxLabel, LV_ALIGN_CENTER, 0, 0);
lv_label_set_text_fmt(GUIView_mainIndicatorInfoBoxLabel, "%d", 0);

// Create Trip text label
GUIView_mainTripTextLabel = lv_label_create(GUIView_mainBodyBox);
lv_obj_set_style_text_align(GUIView_mainTripTextLabel, LV_TEXT_ALIGN_RIGHT, 0);
lv_obj_align(GUIView_mainTripTextLabel, LV_ALIGN_TOP_RIGHT, -20, 222);
lv_obj_set_style_text_color(GUIView_mainTripTextLabel, lv_color_hex(0x4d4d4d), 0);
lv_label_set_text(GUIView_mainTripTextLabel, "Trip");

Expected behavior

Text label containing “Trip” to be drawn without any distortion.

Screenshots or video