fix(layout): calculate content width using x alignment (#6948)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user