How to set size of checkbox

Description

How to set size for checkbox, the fun “lv_obj_set_size” doesn’t work

What MCU/Processor/Board and compiler are you using?

vs2017 simulator

What LVGL version are you using?

v7.1

What do you want to achieve?

change size of checkbox,actually the bullet part,it looks much biger than the text besize, and I just what to resize the bullet to make it look smaller.

What have you tried so far?

I check the source code of “checkbox” obj,I see it’s a button bg, and fit set as lv_fit_tight, so nothing works with lv_obj_set_size.
Then I tried the style of bullet of checkbox, it works in some way,pad top and top buttom works if value set 0,but it’s now a rectangular look, actuall I want a round look. Besides, the width of bullet still can’t be changed,any better idea may help?

Code to reproduce

static lv_style_t style_cb_bg_screen_time;
lv_style_init(&style_cb_bg_screen_time);
lv_style_set_bg_color(&style_cb_bg_screen_time,LV_STATE_DEFAULT,LV_COLOR_GREEN);
//lv_style_set_pad_top(&style_cb_bg_screen_time,LV_STATE_DEFAULT,50);
//lv_style_set_pad_bottom(&style_cb_bg_screen_time,LV_STATE_DEFAULT,50);
lv_style_set_pad_inner(&style_cb_bg_screen_time,LV_STATE_DEFAULT,3);
lv_style_set_pad_left(&style_cb_bg_screen_time,LV_STATE_DEFAULT,0);

static lv_style_t style_cb_bullet_screen_time;
lv_style_init(&style_cb_bullet_screen_time);
lv_style_set_bg_color(&style_cb_bullet_screen_time,LV_STATE_DEFAULT,LV_COLOR_WHITE);
lv_style_set_radius(&style_cb_bullet_screen_time,LV_STATE_DEFAULT,200);
lv_style_set_pad_top(&style_cb_bullet_screen_time,LV_STATE_DEFAULT,5);
lv_style_set_pad_bottom(&style_cb_bullet_screen_time,LV_STATE_DEFAULT,5);

lv_obj_t *cb_30s = lv_checkbox_create(cont_bg,NULL);
lv_checkbox_set_text(cb_30s,"30s");
lv_obj_align(cb_30s,NULL,LV_ALIGN_IN_LEFT_MID, inner_space,0);
lv_obj_add_style(cb_30s,LV_CHECKBOX_PART_BG,&style_cb_bg_screen_time);
lv_obj_add_style(cb_30s,LV_CHECKBOX_PART_BULLET,&style_cb_bullet_screen_time);

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
screen_time_cb

By default, the bullet is square with “font height” side length, and paddings on it make it larger/smaller to the respective directions.

Try this to remove all paddings from it:

  lv_style_set_pad_all(&style_cb_bullet_screen_time,LV_STATE_DEFAULT,0);