Radio button main padding not applied

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Radio button main padding not applied

跳至解决方案
3,751 次查看
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 项奖励
回复
1 解答
3,702 次查看
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

在原帖中查看解决方案

3 回复数
3,727 次查看
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 项奖励
回复
3,730 次查看
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 项奖励
回复
3,703 次查看
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