Roller not display normally

I have test the roller.When I select one, It cant display normally.
The right result shows follows image.


Which version do you use?

5.3 version

I suspect that it’s display driver issue. Do you see any other artifacts on the screen when you play with the theme demo?


there are some other artifacts on the screen like pictures shows. How I solve this problem?

I think it’s probably related to your display driver then.

These paddings are very strange. Have modified the theme or is it the original?

I dont modify any thing.

What is the value of LV_DPI in your lv_conf.h?

#define LV_DPI 30

I’v tested with LV_DPI 30 and it work well here.

To test your display driver create a draggable button and movi on the screen screen with you finger:

    lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);
    lv_obj_set_drag(btn, true);
    lv_label_create(btn, NULL);

Do you see any artifacts?

I test my display driver as you suggest. It can drag. I dont find any artifacts.

Hm, strange. Please the roller try with LV_DPI 100 and use a only a built-in font.


I change the LV_DPI to 100, it looks like image.

it use a build-in font.

Okay, let’s try to narrow the issue:
What do you get for this?

    lv_theme_set_current(lv_theme_night_init(15, NULL));
    lv_roller_create(lv_scr_act(), NULL);

BTW, if you are still at the beginning of your project I highly recommend using the latest, v6.0 version.

Hi,I find the cause of the problem. It is that I modify the source code in lv_draw_label like shows in the picture. I want to change the align type for vertical center for label. but it does support the lv_roller controller.

I don’t understand.

You can’t vertically align to the center because roller “needs to roll”. So vertically it’s where you scroll it.

Sorry, My mean is I want to change the align type for vertical center for lv_label controller,not for label, So it is myself problem.

Now it can work normally after i comment the code of my changed. Thank you for your support.