Start: little layout tweak to First Start Region

This commit is contained in:
marcuspollio
2024-09-30 15:47:59 +13:00
committed by Yorik van Havre
parent a54a7862f4
commit de33890cd4
2 changed files with 3 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ FirstStartWidget::FirstStartWidget(QWidget* parent)
void FirstStartWidget::setupUi()
{
auto outerLayout = gsl::owner<QVBoxLayout*>(new QVBoxLayout(this));
outerLayout->addStretch();
outerLayout->setAlignment(Qt::AlignCenter);
QString application = QString::fromUtf8(App::Application::Config()["ExeName"].c_str());
_welcomeLabel = gsl::owner<QLabel*>(new QLabel);
outerLayout->addWidget(_welcomeLabel);
@@ -74,10 +74,9 @@ void FirstStartWidget::setupUi()
_doneButton = gsl::owner<QPushButton*>(new QPushButton);
connect(_doneButton, &QPushButton::clicked, this, &FirstStartWidget::dismissed);
auto buttonBar = gsl::owner<QHBoxLayout*>(new QHBoxLayout);
buttonBar->addStretch();
buttonBar->setAlignment(Qt::AlignRight);
buttonBar->addWidget(_doneButton);
outerLayout->addLayout(buttonBar);
outerLayout->addStretch();
retranslateUi();
}

View File

@@ -122,14 +122,13 @@ StartView::StartView(QWidget* parent)
firstStartScrollArea->setWidgetResizable(true);
auto firstStartRegion = gsl::owner<QHBoxLayout*>(new QHBoxLayout(firstStartScrollWidget));
firstStartRegion->addStretch();
firstStartRegion->setAlignment(Qt::AlignCenter);
auto firstStartWidget = gsl::owner<FirstStartWidget*>(new FirstStartWidget(this));
connect(firstStartWidget,
&FirstStartWidget::dismissed,
this,
&StartView::firstStartWidgetDismissed);
firstStartRegion->addWidget(firstStartWidget);
firstStartRegion->addStretch();
_contents->addWidget(firstStartScrollArea);
// Documents page