diff --git a/scripts/release.pl b/scripts/release.pl index 388deab0d45..da58a6c1fe2 100755 --- a/scripts/release.pl +++ b/scripts/release.pl @@ -131,8 +131,6 @@ if( $domajor ) { my $splashwidth; unless( $dopoint ) { pod2usage("Splash images/splash/splash-$newmajor.$newminor.png not found") unless -r "images/splash/splash-$newmajor.$newminor.png"; - $splashwidth = `identify -format '%w' images/splash/splash-$newmajor.$newminor.png`; - print "WARNING: Splash images/splash/splash-$newmajor.$newminor.png is $splashwidth pixels wide - will be rescaled\n" if $splashwidth != 600; pod2usage("NSIS image ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.bmp not found") unless -r "ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.bmp"; my $welcomeformat = `identify -format '%wx%h %m' ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.bmp`; pod2usage("NSIS Image ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.bmp mis-sized [$welcomeformat vs. 164x314 BMP3]") unless $welcomeformat =~ /^164x314 /; @@ -174,11 +172,7 @@ run( "dch --newversion $version 'Release of $version'", "dch failed" ); run( "cp debian/changelog /tmp", "backup changelog failed" ); unless( $dopoint ) { - if( $splashwidth != 600 ) { - run( "convert -resize 600x300 images/splash/splash-$newmajor.$newminor.png images/splash/splash.png", "rescale of splash png failed" ); - } else { - run( "cp -v images/splash/splash-$newmajor.$newminor.png images/splash/splash.png", "splash png switch failed" ); - } + run( "cp -v images/splash/splash-$newmajor.$newminor.png images/splash/splash.png", "splash png switch failed" ); run( "convert -resize 164x314 ms-windows/Installer-Files/WelcomeFinishPage-$newmajor.$newminor.bmp BMP3:ms-windows/Installer-Files/WelcomeFinishPage.bmp", "installer bitmap switch failed" ); if( -f "images/splash/splash-release.xcf.bz2" ) { diff --git a/src/app/main.cpp b/src/app/main.cpp index fcc97ba4bfd..593a74d5038 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -37,6 +37,7 @@ #if QT_VERSION < 0x050000 #include #endif +#include #include #include #include @@ -1032,12 +1033,12 @@ int main( int argc, char *argv[] ) //set up splash screen QString mySplashPath( QgsCustomization::instance()->splashPath() ); QPixmap myPixmap( mySplashPath + QLatin1String( "splash.png" ) ); - QSplashScreen *mypSplash = new QSplashScreen( myPixmap ); - if ( mySettings.value( "/qgis/hideSplash" ).toBool() || myHideSplash ) - { - //splash screen hidden - } - else + + double w = 600 * qApp->desktop()->logicalDpiX() / 96; + double h = 300 * qApp->desktop()->logicalDpiY() / 96; + + QSplashScreen *mypSplash = new QSplashScreen( myPixmap.scaled( w, h, Qt::KeepAspectRatio ) ); + if ( !myHideSplash && !mySettings.value( "/qgis/hideSplash" ).toBool() ) { //for win and linux we can just automask and png transparency areas will be used mypSplash->setMask( myPixmap.mask() );