From 9d8fb2952589d8dabf11797a1ca9c3a5c083e02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Ja=C5=82ocha?= Date: Mon, 7 Oct 2024 16:26:22 +0200 Subject: [PATCH] fix: spacing for align bottom vertical layouts (#909) --- src/framework/ui/uiverticallayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/ui/uiverticallayout.cpp b/src/framework/ui/uiverticallayout.cpp index 0e80a0a159..c15ea46fb8 100644 --- a/src/framework/ui/uiverticallayout.cpp +++ b/src/framework/ui/uiverticallayout.cpp @@ -77,7 +77,7 @@ bool UIVerticalLayout::internalUpdate() changed = true; gap = (m_alignBottom) ? -widget->getMarginTop() : (widget->getHeight() + widget->getMarginBottom()); - gap += m_spacing; + gap += m_alignBottom ? -m_spacing : m_spacing; pos.y += gap; preferredHeight += gap; }; @@ -99,4 +99,4 @@ bool UIVerticalLayout::internalUpdate() } return changed; -} \ No newline at end of file +}