mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-12-02 12:29:44 +00:00
fix box overflow
Signed-off-by: sunfei <sunfei.sun@huawei.com> Change-Id: I3b11fd168dcbb4ee3481acb0abde4384b4ff3e7f
This commit is contained in:
parent
a9dfd82e24
commit
7ee6ce1f10
@ -313,10 +313,10 @@ void RenderBoxBase::CalculateSelfLayoutParam()
|
||||
// allow overflow parent when set height or width, except when set flexgrow or flexshrink
|
||||
if (context->GetIsDeclarative()) {
|
||||
if (selfDefineWidth_ && layoutSetByParent.GetMinSize().Width() != layoutSetByParent.GetMaxSize().Width()) {
|
||||
selfMax.SetWidth(constrainMax.Width() - margin_.GetLayoutSize().Width());
|
||||
selfMax.SetWidth(constrainMax.Width());
|
||||
}
|
||||
if (selfDefineHeight_ && layoutSetByParent.GetMinSize().Height() != layoutSetByParent.GetMaxSize().Height()) {
|
||||
selfMax.SetHeight(constrainMax.Height() - margin_.GetLayoutSize().Height());
|
||||
selfMax.SetHeight(constrainMax.Height());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user