Radio button main padding not applied

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Radio button main padding not applied

ソリューションへジャンプ
1,483件の閲覧回数
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 解決策
1,434件の閲覧回数
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 返答(返信)
1,459件の閲覧回数
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 件の賞賛
1,462件の閲覧回数
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 件の賞賛
1,435件の閲覧回数
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