aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2021-09-24 23:15:17 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2021-09-27 20:09:12 +0000
commita6702d5a2df7836c48c222eff120a25a16059d3f (patch)
treece0eeb93f0f22aa09a95ca9d4d155c6fde158da0
parent9b16a14ee44db72bc6b14ca89a09d3589c0f4b3c (diff)
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 <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectwelcomepage.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp
index 9858cb48f3..090cac1d87 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;