fix a layout bug

This commit is contained in:
王劲鹏
2021-04-19 17:57:10 +08:00
committed by osborn
parent bb03b8b5a3
commit 00528a3ce5
2 changed files with 15 additions and 43 deletions

View File

@@ -211,12 +211,12 @@ void DoricLayouts::measureContent(qreal targetWidth, qreal targetHeight) {
if (parentDoricLayout->layoutType != DoricLayoutType::DoricUndefined &&
parentDoricLayout->widthSpec == DoricLayoutSpec::DoricLayoutFit &&
this->widthSpec == DoricLayoutSpec::DoricLayoutMost) {
setMeasuredWidth(0);
setMeasuredWidth(targetWidth);
}
if (parentDoricLayout->layoutType != DoricLayoutType::DoricUndefined &&
parentDoricLayout->heightSpec == DoricLayoutSpec::DoricLayoutFit &&
this->heightSpec == DoricLayoutSpec::DoricLayoutMost) {
setMeasuredHeight(0);
setMeasuredHeight(targetHeight);
}
}
}