From 9e046acd4a756615eb4df54549a05bf5b2e0aca8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 20 Jun 2025 16:01:52 +0200 Subject: [PATCH] ProjectExplorer: Help qBound() do its job ... when calculating the height of the MiniProjectTargetSelector. Change-Id: Icae45872c8a824daa34cc4fa6c9015438d03d6a9 Reviewed-by: Alessandro Portale --- src/plugins/projectexplorer/miniprojecttargetselector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index bed0622deec..4e4cdb2c0fc 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -914,10 +914,10 @@ void MiniProjectTargetSelector::doLayout() // Clamp the size of the listwidgets to be at least as high as the sidebar button // and at most half the height of the entire Qt Creator window. + const int minHeight = alignedWithActionHeight; + const int maxHeight = std::max(minHeight, Core::ICore::mainWindow()->height() / 2); heightWithoutKitArea = summaryLabelHeight - + qBound(alignedWithActionHeight, - maxItemCount * 30 + bottomMargin + titleWidgetsHeight, - Core::ICore::mainWindow()->height() / 2); + + qBound(minHeight, maxItemCount * 30 + bottomMargin + titleWidgetsHeight, maxHeight); int titleY = summaryLabelY + summaryLabelHeight; int listY = titleY + titleWidgetsHeight;