Radio button main padding not applied

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Radio button main padding not applied

Jump to solution
1,999 Views
FederAndInk
Contributor II

I wanted to put padding in between the radio button elements but it didn't do anything, by looking at the code it seems that

lv_obj_t * lv_radiobtn_add_item(lv_obj_t * parent, const char * txt)
{
  ...
  lv_obj_set_style_pad_all(obj, 3, LV_PART_MAIN);
  ...
}

at lvgl/src/extra/widgets/radiobtn/lv_radiobtn.c:96 is at fault, it is overriding the generated style:

lv_style_set_pad_left(&style_screen_radiobtn_1_extra_btns_main_default, 15);
lv_style_set_pad_right(&style_screen_radiobtn_1_extra_btns_main_default, 9);
lv_style_set_pad_top(&style_screen_radiobtn_1_extra_btns_main_default, 12);
lv_style_set_pad_bottom(&style_screen_radiobtn_1_extra_btns_main_default, 10);
...

lv_obj_add_style(screen_radiobtn_1_item, &style_screen_radiobtn_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

 

0 Kudos
Reply
1 Solution
1,950 Views
WenbinYuan
NXP Employee
NXP Employee

Hi @FederAndInk ,

Thanks for your feedback.

You are right with this issue and we will fix it in next release (V1.6.0).

Please feel free to give any type of feedback (bug, improvement, feature and etc.) in the community to help us make GUI Guider better.

Best Regards,

Wenbin Yuan

View solution in original post

3 Replies
1,975 Views
FederAndInk
Contributor II

You can see in my first post the difference between what GUI Guider shows and the application running (I put high padding values to better see the difference):

FederAndInk_0-1682078295001.png

 

0 Kudos
Reply
1,978 Views
FederAndInk
Contributor II

What do you mean? we can do that with plain lvgl, also in GUI Guider there is a Padding section for it and the preview is updating when you change the padding, but running the application isn't reflecting the changes

FederAndInk_0-1682078067546.png

0 Kudos
Reply
1,951 Views
WenbinYuan
NXP Employee
NXP Employee

Hi @FederAndInk ,

Thanks for your feedback.

You are right with this issue and we will fix it in next release (V1.6.0).

Please feel free to give any type of feedback (bug, improvement, feature and etc.) in the community to help us make GUI Guider better.

Best Regards,

Wenbin Yuan