From 81caeaa7253fdf76c1e1930a21bad4443428c2ba Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Fri, 7 Aug 2020 07:31:31 -0400 Subject: [PATCH] Fix `lv_obj_set_height_fit` --- src/lv_core/lv_obj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index e8b50b0e1..c20904733 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -856,7 +856,7 @@ void lv_obj_set_height_fit(lv_obj_t * obj, lv_coord_t h) lv_style_int_t ptop = lv_obj_get_style_pad_top(obj, LV_OBJ_PART_MAIN); lv_style_int_t pbottom = 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); } /**