Control object outline corner radius

can’t control object outline corner radius

Running on linux

LVGL v8.3.10

Square object with outline border of 12 pixels that has no corner radius

I looked in the documentation

for lv_obj_set_style_outline_radius fuction (maybe it’s good idea to have one)

Code to reproduce

lv_obj_t * pSquare = lv_obj_create( lv_scr_act()) ;
lv_obj_align( pSquare, LV_ALIGN_CENTER, 0, 0 ) ;
lv_obj_set_style_radius( pSquare, 0, 0 ) ;
lv_obj_set_style_bg_color( pSquare, lv_color_make( 235, 64, 52 ), 0 ) ;
lv_obj_set_style_outline_width( pSquare, 12, 0 ) ;
lv_obj_set_style_outline_color( pSquare, lv_color_make( 110, 52, 235 ), 0 ) ;

Screenshot and/or video

Screenshot 2023-10-12 160446

Try use border instead outline.

Thanks for you’r answer.

I did but this is not so good sulotion because you can’t control the opacity of the border by it’s own. The border sits on top of the content area and its transparensy depends on the transparensy of the content area so I can’t make just the border transparent.

Is there a way to ask the developers to add these feature? It seems that the ability slipped in the development process because the developers referred to the control of the radius on the content area (which includes the border) as you can see in the picture I attached.

Yes opacity is not ok but maybe

or yu can use object inside object

1 Like

Thanks Marian. Object inside object is a great workaround.