Indicator in progress bar (lv_bar) always jumps to 100% regardless what Current value is requested


I want to create progress bar and control it using lv_bar_set_value() API.
So what I am trying to do is to set a new value to 70 and monitor the indicator which supposed to only cover 70% from the progress bar:

But what actually happens is that when ever i set any value greater than 0 (even if I set 1 ), Indicator in progress bar jumps to max value (100):

I tried my code on simulator, and everything work just fine
Screenshot from 2022-01-13 10-38-48

But for some reason, it is not working on HW, although I am already able to display different graphics from LVGL (labels, imgs) but with lv_bar, something goes wrong.

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

Run LVGL on Cortex-M4 core for IMX8QM module.

What LVGL version are you using?


What do you want to achieve?

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

	lv_obj_t * bg = lv_obj_create(lv_scr_act());
	lv_obj_t * bar = lv_bar_create(bg);

	static lv_style_t style_bg;
	static lv_style_t style_indic;

    lv_color_t color = lv_color_black();
    lv_obj_set_size(bg, 350, 120);
    lv_obj_set_style_bg_color (bg,color,0);

    /*bar background style*/
    lv_style_set_bg_color(&style_bg,lv_color_make(0xd4, 0xd7, 0xd9));
    lv_style_set_bg_opa(&style_bg, LV_OPA_30);

    /*Indic style*/
    lv_style_set_bg_opa(&style_indic, LV_OPA_100);
    lv_style_set_bg_color(&style_indic, lv_color_make(0xd4, 0xd7, 0xd9));

    /*apply Styles to bar*/
    lv_obj_add_style(bar, &style_bg, 0);
    lv_obj_add_style(bar, &style_indic, LV_PART_INDICATOR);

    /*bar config*/
    lv_obj_set_size(bar, 300, 8);
    lv_obj_set_pos(bar, 3, 10);
    lv_bar_set_value(bar, 70, LV_ANIM_OFF);

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


I think I found the problem. I was not enabling draw complex feature “LV_DRAW_COMPLEX”.

Thank you,