mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
Never show an empty jobs label.
This commit is contained in:
parent
a8b8a3a455
commit
22411d2399
1 changed files with 12 additions and 9 deletions
|
@ -201,14 +201,16 @@ PartitionViewStep::createSummaryWidget() const
|
||||||
info.partitionModelAfter->setParent( widget );
|
info.partitionModelAfter->setParent( widget );
|
||||||
formLayout->addRow( tr( "After:" ), preview );
|
formLayout->addRow( tr( "After:" ), preview );
|
||||||
}
|
}
|
||||||
QLabel* jobsLabel = new QLabel( widget );
|
|
||||||
mainLayout->addWidget( jobsLabel );
|
|
||||||
QStringList jobsLines;
|
QStringList jobsLines;
|
||||||
foreach ( const Calamares::job_ptr& job, jobs() )
|
foreach ( const Calamares::job_ptr& job, jobs() )
|
||||||
{
|
{
|
||||||
if ( !job->prettyDescription().isEmpty() )
|
if ( !job->prettyDescription().isEmpty() )
|
||||||
jobsLines.append( job->prettyDescription() );
|
jobsLines.append( job->prettyDescription() );
|
||||||
}
|
}
|
||||||
|
if ( !jobsLines.isEmpty() )
|
||||||
|
{
|
||||||
|
QLabel* jobsLabel = new QLabel( widget );
|
||||||
|
mainLayout->addWidget( jobsLabel );
|
||||||
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
||||||
int m = CalamaresUtils::defaultFontHeight() / 2;
|
int m = CalamaresUtils::defaultFontHeight() / 2;
|
||||||
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
|
@ -216,6 +218,7 @@ PartitionViewStep::createSummaryWidget() const
|
||||||
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
||||||
jobsLabel->setAutoFillBackground( true );
|
jobsLabel->setAutoFillBackground( true );
|
||||||
jobsLabel->setPalette( pal );
|
jobsLabel->setPalette( pal );
|
||||||
|
}
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue