Welcome: Unify design with Qt Design Studio

This applies the design of the new Welcome Screen for the Qt Design
Studio to the Welcome Screen of Qt Creator.

Change-Id: Id63283da1db43ac1036d371694cc2ea4a6de8d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2021-11-29 20:48:43 +01:00
parent 03e4548d24
commit 196aee97b1
43 changed files with 626 additions and 664 deletions

View File

@@ -157,6 +157,7 @@ SectionedProducts::SectionedProducts(QWidget *parent)
auto sectionedView = new QWidget;
auto layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->addStretch();
sectionedView->setLayout(layout);
area->setWidget(sectionedView);
@@ -377,10 +378,9 @@ void SectionedProducts::addNewSection(const Section &section, const QList<Core::
m_productModels.insert(section, productModel);
const auto it = m_gridViews.insert(section, gridView);
QFont f = font();
f.setPixelSize(16);
auto sectionLabel = new QLabel(section.name);
sectionLabel->setFont(f);
sectionLabel->setContentsMargins(0, Core::WelcomePageHelpers::ItemGap, 0, 0);
sectionLabel->setFont(Core::WelcomePageHelpers::brandFont());
auto scrollArea = qobject_cast<QScrollArea *>(widget(0));
auto vbox = qobject_cast<QVBoxLayout *>(scrollArea->widget()->layout());

View File

@@ -65,27 +65,33 @@ class QtMarketplacePageWidget : public QWidget
public:
QtMarketplacePageWidget()
{
const int sideMargin = 27;
auto searchBox = new Core::SearchBox(this);
m_searcher = searchBox->m_lineEdit;
m_searcher->setPlaceholderText(QtMarketplaceWelcomePage::tr("Search in Marketplace..."));
auto vbox = new QVBoxLayout(this);
vbox->setContentsMargins(30, sideMargin, 0, 0);
vbox->setContentsMargins(0, 0, 0, Core::WelcomePageHelpers::ItemGap);
vbox->setSpacing(Core::WelcomePageHelpers::ItemGap);
auto hbox = new QHBoxLayout;
auto searchBar = Core::WelcomePageHelpers::panelBar();
auto hbox = new QHBoxLayout(searchBar);
hbox->setContentsMargins(Core::WelcomePageHelpers::HSpacing, 0,
Core::WelcomePageHelpers::HSpacing, 0);
hbox->addWidget(searchBox);
hbox->addSpacing(sideMargin);
vbox->addItem(hbox);
vbox->addWidget(searchBar);
m_errorLabel = new QLabel(this);
m_errorLabel->setVisible(false);
vbox->addWidget(m_errorLabel);
auto resultWidget = new QWidget(this);
auto resultHBox = new QHBoxLayout(resultWidget);
resultHBox->setContentsMargins(Core::WelcomePageHelpers::HSpacing, 0, 0, 0);
m_sectionedProducts = new SectionedProducts(this);
auto progressIndicator = new Utils::ProgressIndicator(ProgressIndicatorSize::Large, this);
progressIndicator->attachToWidget(m_sectionedProducts);
progressIndicator->hide();
vbox->addWidget(m_sectionedProducts);
resultHBox->addWidget(m_sectionedProducts);
vbox->addWidget(resultWidget);
connect(m_sectionedProducts, &SectionedProducts::toggleProgressIndicator,
progressIndicator, &Utils::ProgressIndicator::setVisible);