From 87babd2c41f1fac9bbfc4635242735837e38840f Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Fri, 7 Nov 2025 15:44:43 +0100 Subject: [PATCH] RMG-Input: allow middle widget in AlignCenterLayout to have 40% of width --- Source/RMG-Input/UserInterface/Layout/AlignCenterLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/RMG-Input/UserInterface/Layout/AlignCenterLayout.cpp b/Source/RMG-Input/UserInterface/Layout/AlignCenterLayout.cpp index 2e6c9d72..df5a60b1 100644 --- a/Source/RMG-Input/UserInterface/Layout/AlignCenterLayout.cpp +++ b/Source/RMG-Input/UserInterface/Layout/AlignCenterLayout.cpp @@ -81,7 +81,7 @@ void AlignCenterLayout::setGeometry(const QRect& rect) // the side widgets are limited to 25% of available width - // the middle widget is limited to 1/3rd of the available width + // the middle widget is limited to 40% of the available width // // this also takes into account the situation where there's an overlap // between widgets, which is something this avoids. @@ -89,7 +89,7 @@ void AlignCenterLayout::setGeometry(const QRect& rect) const int itemHeight = centerItem->minimumSize().height() + spacing; const int rectWidth = rect.width(); const int topLocation = rect.y() + spacing; - const int centerItemWidth = std::min(centerItem->sizeHint().width(), rectWidth / 3); + const int centerItemWidth = std::min(centerItem->sizeHint().width(), static_cast(std::ceil(rectWidth / 2.5))); const int centerItemLocation = ((rectWidth / 2)) - (centerItemWidth / 2); const int maxSideItemWidth = std::min(centerItemLocation, rectWidth / 4) - spacing; const int sideItemWidth = std::min(leftItem->minimumSize().width(), maxSideItemWidth);