Hello,
I want to have a background like attached picture but I could not make it with gradient tool. You see it starts with dark color at top, then goes to light blue in the middle and goes to darker color at the bottom. Could someone help me to do that ? I will use it with imx RT1176. I use latest Gui Guider and latest lvgl version in the program.
Solved! Go to Solution.
Hi @frozen
The current LVGL does not support multi-point gradient colors. We recommend that you first use two items to splice them together to achieve the effect you want.
By the way, you can add the custom style code to the current screen.
lv_obj_set_style_bg_grad_stop(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
The API can set the point from which the background's gradient color should start. 0 means to top/left size, 255 for the bottom/right side, and 128 for the center.
Best regards
Liubin
Hi @frozen
The current LVGL does not support multi-point gradient colors. We recommend that you first use two items to splice them together to achieve the effect you want.
By the way, you can add the custom style code to the current screen.
lv_obj_set_style_bg_grad_stop(ui->screen_cont_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
The API can set the point from which the background's gradient color should start. 0 means to top/left size, 255 for the bottom/right side, and 128 for the center.
Best regards
Liubin