[welcome] Use convenience image loader from Branding

main
Adriaan de Groot 6 years ago
parent 07c638ed48
commit f54b7dee9f

@ -271,9 +271,9 @@ WelcomePage::externallySelectedLanguage( int row )
}
void
WelcomePage::setLanguageIcon( QIcon i )
WelcomePage::setLanguageIcon( QPixmap i )
{
ui->languageIcon->setPixmap( i.pixmap(48) );
ui->languageIcon->setPixmap( i );
}

@ -43,7 +43,7 @@ public:
bool showKnownIssuesUrl,
bool showReleaseNotesUrl );
/// @brief Set international language-selector icon
void setLanguageIcon( QIcon );
void setLanguageIcon( QPixmap );
/// @brief Results of requirements checking
bool verdict() const;

@ -24,10 +24,12 @@
#include "geoip/Handler.h"
#include "locale/Lookup.h"
#include "modulesystem/ModuleManager.h"
#include "utils/Logger.h"
#include "utils/Variant.h"
#include "Branding.h"
#include "modulesystem/ModuleManager.h"
#include <QFutureWatcher>
#include <QVariant>
@ -142,7 +144,7 @@ WelcomeViewStep::setConfigurationMap( const QVariantMap& configurationMap )
QString language = CalamaresUtils::getString( configurationMap, "languageIcon" );
if ( !language.isEmpty() )
{
auto icon = QIcon::fromTheme( language );
auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) );
if ( !icon.isNull() )
m_widget->setLanguageIcon( icon );
}

Loading…
Cancel
Save