From c1d9eb5f72c08bc4bced19eb71247d951c368cc0 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 6 Oct 2025 12:28:25 -0500 Subject: [PATCH] fix(ui): fix incorrect order in SynthesizeSide --- src/ui/CLayoutFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/CLayoutFrame.cpp b/src/ui/CLayoutFrame.cpp index 3025ca3..4ed58dd 100644 --- a/src/ui/CLayoutFrame.cpp +++ b/src/ui/CLayoutFrame.cpp @@ -11,12 +11,12 @@ 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 && size != 0.0f) { return center + (size * 0.5f); + } else if (center != CFramePoint::UNDEFINED && opposite != CFramePoint::UNDEFINED) { + return center + center - opposite; } else { return CFramePoint::UNDEFINED; }