mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -04:00
Rearrange WelcomePage checker layout to make more space for reports.
This commit is contained in:
parent
02f4ab1501
commit
43698b18f5
3 changed files with 25 additions and 30 deletions
|
@ -53,13 +53,9 @@ WelcomePage::WelcomePage( RequirementsChecker* requirementsChecker, QWidget* par
|
||||||
ui->mainText->setOpenExternalLinks( true );
|
ui->mainText->setOpenExternalLinks( true );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1><br/>"
|
ui->mainText->setText( tr( "<h1>Welcome to the %1 installer.</h1>" )
|
||||||
"This program will ask you some questions and "
|
|
||||||
"set up %2 on your computer." )
|
|
||||||
.arg( Calamares::Branding::instance()->
|
.arg( Calamares::Branding::instance()->
|
||||||
string( Calamares::Branding::VersionedName ) )
|
string( Calamares::Branding::VersionedName ) ) );
|
||||||
.arg( Calamares::Branding::instance()->
|
|
||||||
string( Calamares::Branding::ProductName ) ) );
|
|
||||||
ui->retranslateUi( this );
|
ui->retranslateUi( this );
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -91,8 +87,8 @@ WelcomePage::WelcomePage( RequirementsChecker* requirementsChecker, QWidget* par
|
||||||
Calamares::Branding::VersionedName ) ) );
|
Calamares::Branding::VersionedName ) ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
ui->verticalLayout->insertStretch( 4 );
|
ui->verticalLayout->insertStretch( 3 );
|
||||||
ui->verticalLayout->insertWidget( 5, m_requirementsChecker->widget() );
|
ui->verticalLayout->insertWidget( 4, m_requirementsChecker->widget() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0,0">
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -45,22 +45,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
|
@ -78,15 +78,16 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !allChecked )
|
|
||||||
{
|
|
||||||
QLabel* textLabel = new QLabel;
|
QLabel* textLabel = new QLabel;
|
||||||
|
|
||||||
textLabel->setWordWrap( true );
|
textLabel->setWordWrap( true );
|
||||||
m_entriesLayout->insertWidget( 0, textLabel );
|
m_entriesLayout->insertWidget( 0, textLabel );
|
||||||
m_entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
|
||||||
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||||
|
|
||||||
|
if ( !allChecked )
|
||||||
|
{
|
||||||
|
m_entriesLayout->insertSpacing( 1, CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
|
|
||||||
if ( !requirementsSatisfied )
|
if ( !requirementsSatisfied )
|
||||||
{
|
{
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
|
@ -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 )
|
for ( const PrepareEntry& entry : checkEntries )
|
||||||
{
|
{
|
||||||
|
if ( entry.enumerationText().isEmpty() )
|
||||||
|
continue;
|
||||||
|
|
||||||
CheckItemWidget* ciw = new CheckItemWidget( entry.checked );
|
CheckItemWidget* ciw = new CheckItemWidget( entry.checked );
|
||||||
CALAMARES_RETRANSLATE( ciw->setText( entry.enumerationText() ); )
|
CALAMARES_RETRANSLATE( ciw->setText( entry.enumerationText() ); )
|
||||||
entriesLayout->addWidget( ciw );
|
entriesLayout->addWidget( ciw );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue