diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index 8fcfc0d8a..ecf974ada 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -53,13 +53,9 @@ WelcomePage::WelcomePage( RequirementsChecker* requirementsChecker, QWidget* par ui->mainText->setOpenExternalLinks( true ); CALAMARES_RETRANSLATE( - ui->mainText->setText( tr( "

Welcome to the %1 installer.


" - "This program will ask you some questions and " - "set up %2 on your computer." ) + ui->mainText->setText( tr( "

Welcome to the %1 installer.

" ) .arg( Calamares::Branding::instance()-> - string( Calamares::Branding::VersionedName ) ) - .arg( Calamares::Branding::instance()-> - string( Calamares::Branding::ProductName ) ) ); + string( Calamares::Branding::VersionedName ) ) ); ui->retranslateUi( this ); ) @@ -91,8 +87,8 @@ WelcomePage::WelcomePage( RequirementsChecker* requirementsChecker, QWidget* par Calamares::Branding::VersionedName ) ) ); } ); - ui->verticalLayout->insertStretch( 4 ); - ui->verticalLayout->insertWidget( 5, m_requirementsChecker->widget() ); + ui->verticalLayout->insertStretch( 3 ); + ui->verticalLayout->insertWidget( 4, m_requirementsChecker->widget() ); } diff --git a/src/modules/welcome/WelcomePage.ui b/src/modules/welcome/WelcomePage.ui index cc3f0b469..af3224711 100644 --- a/src/modules/welcome/WelcomePage.ui +++ b/src/modules/welcome/WelcomePage.ui @@ -15,7 +15,7 @@ - + @@ -45,22 +45,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - diff --git a/src/modules/welcome/checker/CheckerWidget.cpp b/src/modules/welcome/checker/CheckerWidget.cpp index 9f39982a6..9f7311e7b 100644 --- a/src/modules/welcome/checker/CheckerWidget.cpp +++ b/src/modules/welcome/checker/CheckerWidget.cpp @@ -78,14 +78,15 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries ) } } + QLabel* textLabel = new QLabel; + + textLabel->setWordWrap( true ); + m_entriesLayout->insertWidget( 0, textLabel ); + textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); + if ( !allChecked ) { - QLabel* textLabel = new QLabel; - - textLabel->setWordWrap( true ); - m_entriesLayout->insertWidget( 0, textLabel ); m_entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 ); - textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); if ( !requirementsSatisfied ) { @@ -117,6 +118,17 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries ) ) } } + + if ( allChecked && requirementsSatisfied ) + { + CALAMARES_RETRANSLATE( + textLabel->setText( tr( "This program will ask you some questions and " + "set up %2 on your computer." ) + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::ProductName ) ) ); + textLabel->setAlignment( Qt::AlignCenter ); + ) + } } @@ -138,6 +150,9 @@ CheckerWidget::showDetailsDialog( const QList< PrepareEntry >& checkEntries ) for ( const PrepareEntry& entry : checkEntries ) { + if ( entry.enumerationText().isEmpty() ) + continue; + CheckItemWidget* ciw = new CheckItemWidget( entry.checked ); CALAMARES_RETRANSLATE( ciw->setText( entry.enumerationText() ); ) entriesLayout->addWidget( ciw );