Feature: allow disable welcome-logo resizing

This commit is contained in:
Adriaan de Groot 2017-07-04 04:30:08 -04:00
parent c4f955874d
commit 44e6955f19
4 changed files with 21 additions and 10 deletions

View file

@ -128,13 +128,23 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries )
imagePath( Calamares::Branding::ProductWelcome ) );
if ( !theImage.isNull() )
{
FixedAspectRatioLabel* imageLabel = new FixedAspectRatioLabel;
QLabel* imageLabel;
if ( Calamares::Branding::instance()->welcomeExpandingLogo() )
{
FixedAspectRatioLabel *p = new FixedAspectRatioLabel;
p->setPixmap( theImage );
imageLabel = p;
}
else
{
imageLabel = new QLabel;
imageLabel->setPixmap( theImage );
}
imageLabel->setContentsMargins( 4, CalamaresUtils::defaultFontHeight() * 3 / 4, 4, 4 );
m_mainLayout->addWidget( imageLabel );
imageLabel->setAlignment( Qt::AlignCenter );
imageLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
imageLabel->setPixmap( theImage );
}
}
CALAMARES_RETRANSLATE(