Never show an empty jobs label.
This commit is contained in:
parent
a8b8a3a455
commit
22411d2399
@ -201,14 +201,16 @@ PartitionViewStep::createSummaryWidget() const
|
||||
info.partitionModelAfter->setParent( widget );
|
||||
formLayout->addRow( tr( "After:" ), preview );
|
||||
}
|
||||
QLabel* jobsLabel = new QLabel( widget );
|
||||
mainLayout->addWidget( jobsLabel );
|
||||
QStringList jobsLines;
|
||||
foreach ( const Calamares::job_ptr& job, jobs() )
|
||||
{
|
||||
if ( !job->prettyDescription().isEmpty() )
|
||||
jobsLines.append( job->prettyDescription() );
|
||||
}
|
||||
if ( !jobsLines.isEmpty() )
|
||||
{
|
||||
QLabel* jobsLabel = new QLabel( widget );
|
||||
mainLayout->addWidget( jobsLabel );
|
||||
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
||||
int m = CalamaresUtils::defaultFontHeight() / 2;
|
||||
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
||||
@ -216,6 +218,7 @@ PartitionViewStep::createSummaryWidget() const
|
||||
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
||||
jobsLabel->setAutoFillBackground( true );
|
||||
jobsLabel->setPalette( pal );
|
||||
}
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user