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); }