mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[gui/hidpi] scale splash screen on startup not on release
This commit is contained in:
parent
87d0168ff8
commit
9446b20fe1
@ -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" ) {
|
||||
|
@ -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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user