From a6702d5a2df7836c48c222eff120a25a16059d3f Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 24 Sep 2021 23:15:17 +0200 Subject: [PATCH] ProjectExplorer: Fix widths distributions in project welcome page The widths of the "Sessions" and "Projects" lists are not well distributed on Full HD screen width. The sessions are squeezed and the projects are extra wide. Set a stretch factor also on the Settings widget, so that both stretch proportionally. Use a 1 to 3 ratio. This change also removes the setting of struts which does not appear to have any effect and was (by mistake?) assigned to one sublayout, twice. Fixes: QTCREATORBUG-26319 Change-Id: I365a6a6c5d9c2250e3f711cc139d3279f2f5e3b1 Reviewed-by: Eike Ziller Reviewed-by: Christian Stenger --- src/plugins/projectexplorer/projectwelcomepage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 9858cb48f39..090cac1d877 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -614,14 +614,12 @@ public: auto vbox1 = new QVBoxLayout; vbox1->setContentsMargins(0, 0, 0, 0); - vbox1->addStrut(200); vbox1->addItem(hbox11); vbox1->addSpacing(16); vbox1->addWidget(sessionsList); auto vbox2 = new QVBoxLayout; vbox2->setContentsMargins(0, 0, 0, 0); - vbox1->addStrut(200); vbox2->addItem(hbox21); vbox2->addSpacing(16); vbox2->addWidget(projectsList); @@ -629,9 +627,10 @@ public: auto hbox = new QHBoxLayout(this); hbox->setContentsMargins(30, 27, 0, 27); hbox->addItem(vbox1); + hbox->setStretchFactor(vbox1, 1); hbox->addSpacing(16); hbox->addItem(vbox2); - hbox->setStretchFactor(vbox2, 2); + hbox->setStretchFactor(vbox2, 3); } SessionDelegate m_sessionDelegate;