Never show an empty jobs label.
This commit is contained in:
parent
a8b8a3a455
commit
22411d2399
@ -201,21 +201,24 @@ 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() );
|
||||||
}
|
}
|
||||||
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
if ( !jobsLines.isEmpty() )
|
||||||
int m = CalamaresUtils::defaultFontHeight() / 2;
|
{
|
||||||
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
QLabel* jobsLabel = new QLabel( widget );
|
||||||
QPalette pal;
|
mainLayout->addWidget( jobsLabel );
|
||||||
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
||||||
jobsLabel->setAutoFillBackground( true );
|
int m = CalamaresUtils::defaultFontHeight() / 2;
|
||||||
jobsLabel->setPalette( pal );
|
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
|
QPalette pal;
|
||||||
|
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
||||||
|
jobsLabel->setAutoFillBackground( true );
|
||||||
|
jobsLabel->setPalette( pal );
|
||||||
|
}
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user