When a parent is set style with style.body.radius > 0.
and if a child is placed near the parent’s conner,
at any version, the child doen’t be round-croped/masked by the parent’ conner.
Like this simple code example :
a label (child) in a rounded-rect (parent)
Code
static lv_style_t style; lv_style_copy(&style, &lv_style_plain);
style.body.main_color = LV_COLOR_WHITE;
style.body.grad_color = style.body.main_color;
style.body.radius = 30;
style.body.border.width = 0;
style.text.color = LV_COLOR_RED;
lv_obj_t* rounded_rect = lv_obj_create(lv_scr_act(), NULL);
lv_obj_set_style(rounded_rect, &style);
lv_obj_set_size(rounded_rect, 100, 80);
lv_obj_align(rounded_rect, NULL, LV_ALIGN_CENTER, 0,0);
lv_obj_t* label = lv_label_create(rounded_rect, NULL);
lv_obj_set_style(label, &style);
lv_label_set_text( label, "Hello World");
lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, -20);
Result
Wish any child is automatically rounded-croped/masked
by parent’s style.body.radius like this.
If lvgl has this figture automatically, it maybe useful and more beautiful
for any parent such as lv_cont, lv_page with style.body.radius > 0
that it has any child when be scrolled/placed near the parent’s rounded-conner.
Thank you.