From a298c245accbdd773f6bf4aac2d1494498447cae Mon Sep 17 00:00:00 2001 From: Liam <30486941+liamHowatt@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:44:25 +0200 Subject: [PATCH] fix(layout): calculate content width using x alignment (#6948) --- src/core/lv_obj_pos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lv_obj_pos.c b/src/core/lv_obj_pos.c index cc5fec55d..db38cdc8a 100644 --- a/src/core/lv_obj_pos.c +++ b/src/core/lv_obj_pos.c @@ -1046,7 +1046,7 @@ static int32_t calc_content_width(lv_obj_t * obj) default: /* Consider other cases only if x=0 and use the width of the object. * With x!=0 circular dependency could occur. */ - if(lv_obj_get_style_y(child, 0) == 0) { + if(lv_obj_get_style_x(child, 0) == 0) { child_res_tmp = lv_area_get_width(&child->coords) + space_left; child_res_tmp += lv_obj_get_style_margin_right(child, LV_PART_MAIN); }