lv_style_int_tptop =lv_obj_get_style_pad_top(obj, LV_OBJ_PART_MAIN); lv_style_int_tpbottom =lv_obj_get_style_pad_bottom(obj, LV_OBJ_PART_MAIN); lv_obj_set_width(obj, h - ptop - pbottom); lv_obj_set_height(obj, h - ptop - pbottom); ...
The functionslv_obj_set_content_widthandlv_obj_set_content_heightsubtract the border width from the object width but they don't check which border sides are hidden. As a result, when only the top border is active, the border width will erroneously be subtracted twice. ...