fix(ui): fix height calculation of CLayoutFrame

This commit is contained in:
VDm 2025-03-15 22:08:44 +04:00
parent a62523c9b3
commit 4bd30968fc

View File

@ -11,10 +11,10 @@
STORM_EXPLICIT_LIST(CLayoutFrame, resizeLink) LayoutFrame::s_resizePendingList;
float SynthesizeSide(float center, float opposite, float size) {
if (center != CFramePoint::UNDEFINED && opposite != CFramePoint::UNDEFINED) {
return center + center - opposite;
} else if (opposite != CFramePoint::UNDEFINED && size != 0.0f) {
if (opposite != CFramePoint::UNDEFINED && size != 0.0f) {
return opposite + size;
} else if (center != CFramePoint::UNDEFINED && opposite != CFramePoint::UNDEFINED) {
return center + center - opposite;
} else if (center != CFramePoint::UNDEFINED && size != 0.0f) {
return center + (size * 0.5f);
} else {