From 161046af431c7f939cd3b540e63d7cb8853939aa Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Sat, 20 Jun 2015 00:19:12 +0200 Subject: [PATCH] Use ProductWelcome branding image, if available. --- src/modules/welcome/checker/CheckerWidget.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/welcome/checker/CheckerWidget.cpp b/src/modules/welcome/checker/CheckerWidget.cpp index 9f7311e7b..a97243d13 100644 --- a/src/modules/welcome/checker/CheckerWidget.cpp +++ b/src/modules/welcome/checker/CheckerWidget.cpp @@ -121,6 +121,22 @@ CheckerWidget::init( const QList< PrepareEntry >& checkEntries ) if ( allChecked && requirementsSatisfied ) { + if ( !Calamares::Branding::instance()-> + imagePath( Calamares::Branding::ProductWelcome ).isEmpty() ) + { + QPixmap theImage = QPixmap( Calamares::Branding::instance()-> + imagePath( Calamares::Branding::ProductWelcome ) ); + if ( !theImage.isNull() ) + { + QLabel* imageLabel = new QLabel; + imageLabel->setContentsMargins( 4, CalamaresUtils::defaultFontHeight(), 4, 4 ); + m_entriesLayout->addWidget( imageLabel ); + imageLabel->setAlignment( Qt::AlignCenter ); + imageLabel->setScaledContents( false ); + + imageLabel->setPixmap( theImage ); + } + } CALAMARES_RETRANSLATE( textLabel->setText( tr( "This program will ask you some questions and " "set up %2 on your computer." )