diff --git a/src/branding/default/branding.desc b/src/branding/default/branding.desc index 22443c350..ae47e1662 100644 --- a/src/branding/default/branding.desc +++ b/src/branding/default/branding.desc @@ -8,6 +8,10 @@ componentName: default # same distribution. welcomeStyleCalamares: false +# Should the welcome image (productWelcome, below) be scaled +# up beyond its natural size? +welcomeExpandingLogo: true + strings: productName: Generic GNU/Linux shortProductName: Generic diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index da6cce9f3..25102d3fd 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -110,6 +110,7 @@ Branding::Branding( const QString& brandingFilePath, bail( "Syntax error in strings map." ); m_welcomeStyleCalamares = doc[ "welcomeStyleCalamares" ].as< bool >( false ); + m_welcomeExpandingLogo = doc[ "welcomeExpandingLogo" ].as< bool >( true ); QVariantMap strings = CalamaresUtils::yamlMapToVariant( doc[ "strings" ] ).toMap(); @@ -276,12 +277,6 @@ Branding::slideshowPath() const return m_slideshowPath; } -bool -Branding::welcomeStyleCalamares() const -{ - return m_welcomeStyleCalamares; -} - void Branding::setGlobals( GlobalStorage* globalStorage ) const { diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 5198f44f1..c56db2db2 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -88,7 +88,8 @@ public: QPixmap image( Branding::ImageEntry imageEntry, const QSize& size ) const; QString slideshowPath() const; - bool welcomeStyleCalamares() const; + bool welcomeStyleCalamares() const { return m_welcomeStyleCalamares; } + bool welcomeExpandingLogo() const { return m_welcomeExpandingLogo; } /** * Creates a map called "branding" in the global storage, and inserts an @@ -115,6 +116,7 @@ private: QString m_translationsPathPrefix; bool m_welcomeStyleCalamares; + bool m_welcomeExpandingLogo; }; template inline QString operator*(U e) { return Branding::instance()->string( e ); } diff --git a/src/modules/welcome/checker/CheckerWidget.cpp b/src/modules/welcome/checker/CheckerWidget.cpp index 9b6ec7806..500ab6f85 100644 --- a/src/modules/welcome/checker/CheckerWidget.cpp +++ b/src/modules/welcome/checker/CheckerWidget.cpp @@ -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(