Commit d010dbd1 authored by Alessandro Portale's avatar Alessandro Portale

Welcome: Remove the big minimal height requirement

The SideBar in the QtWidgets based Welcome mode had a high minimal
height which cause whole Qt Creator not to fit on my HD(720) screen.

This change wraps the SideBar into a vertical scroll area.

Change-Id: I1d70ced1bbe803fb866159dd557a401c3ab6a9b2
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 410e31c6
......@@ -50,6 +50,7 @@
#include <QMouseEvent>
#include <QOpenGLWidget>
#include <QPainter>
#include <QScrollArea>
#include <QStackedWidget>
#include <QTimer>
#include <QVBoxLayout>
......@@ -289,6 +290,11 @@ WelcomeMode::WelcomeMode()
m_modeWidget->setPalette(palette);
m_sideBar = new SideBar(m_modeWidget);
auto scrollableSideBar = new QScrollArea(m_modeWidget);
scrollableSideBar->setWidget(m_sideBar);
scrollableSideBar->setWidgetResizable(true);
scrollableSideBar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollableSideBar->setFrameShape(QFrame::NoFrame);
auto divider = new QWidget(m_modeWidget);
divider->setMaximumWidth(1);
......@@ -300,7 +306,7 @@ WelcomeMode::WelcomeMode()
m_pageStack->setAutoFillBackground(true);
auto hbox = new QHBoxLayout;
hbox->addWidget(m_sideBar);
hbox->addWidget(scrollableSideBar);
hbox->addWidget(divider);
hbox->addWidget(m_pageStack);
hbox->setStretchFactor(m_pageStack, 10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment