Identify part of button to control visual


Can not identify part of button to control behaviour.

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


What LVGL version are you using?


What do you want to achieve?

To identify this thin portion of the button from where it is created.

What have you tried so far?

Tried to close padding,border width,bg opa
on default and focused state but nothing it is still there and it enlarges as button is pressed normally without me placing any transition to pressed state of button.

What do i miss?

Code to reproduce

lv_style_set_outline_width(&strBtnStyle, 0);
lv_style_set_pad_all(&strBtnStyle, 0);
lv_style_set_border_width(&strBtnStyle, 0);
lv_style_set_border_opa(&strBtnStyle, LV_OPA_TRANSP);
lv_style_set_bg_opa(&strBtnStyle, LV_OPA_TRANSP);
lv_style_set_text_font(&strBtnStyle, &lv_font_montserrat_10);

lv_style_set_outline_width(&strBtnStyleFc, 0);
lv_style_set_pad_all(&strBtnStyleFc, 0);
lv_style_set_border_width(&strBtnStyleFc, 0);
lv_style_set_border_opa(&strBtnStyleFc, LV_OPA_TRANSP);
lv_style_set_bg_opa(&strBtnStyle, LV_OPA_TRANSP);

lv_obj_t * btnPlus = lv_btn_create(parent);
lv_obj_set_size(btnPlus, spinboxConf.height, spinboxConf.height);
lv_obj_align_to(btnPlus, spinbox, btnAllingPlus, xOff, -yOff);
lv_obj_set_style_bg_img_src(btnPlus, LV_SYMBOL_PLUS, 0);

lv_obj_add_style(btnPlus, &strBtnStyle, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_style(btnPlus, &strBtnStyleFc, LV_PART_MAIN | LV_STATE_FOCUSED);
lv_obj_add_style(btnPlus, &strBtnStyleFc, LV_PART_MAIN | LV_STATE_FOCUS_KEY);

Screenshot and/or video

Screenshot 2023-02-25 at 10.36.16

there is by default some shadow in button. I would have been great if default setup of values and behaviour to be described somewhere or at least to be properly described



Set the width of the shadow in pixels. The value should be >= 0.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes