Skip to content
Permalink
Browse files

[gui/hidpi] scale splash screen on startup not on release

  • Loading branch information
jef-n committed Jul 2, 2016
1 parent 87d0168 commit 9446b20fe1d67ea8eb9572b72b69817d5129f602
Showing with 8 additions and 13 deletions.
  1. +1 −7 scripts/release.pl
  2. +7 −6 src/app/main.cpp
@@ -131,8 +131,6 @@ ($$)
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( "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" ) {
@@ -37,6 +37,7 @@
#if QT_VERSION < 0x050000
#include <QPlastiqueStyle>
#endif
#include <QDesktopWidget>
#include <QTranslator>
#include <QImageReader>
#include <QMessageBox>
@@ -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() );

0 comments on commit 9446b20

Please sign in to comment.
You can’t perform that action at this time.