1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00

Scale splash screen to size of screen

This commit is contained in:
Jon Beniston 2022-12-20 09:56:30 +00:00
parent e5c887646a
commit e3f9d1032d

View File

@ -17,11 +17,20 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QScreen>
#include "sdrangelsplash.h"
SDRangelSplash::SDRangelSplash(const QPixmap& pixmap)
{
QSplashScreen::setPixmap(pixmap);
int screenWidth = screen()->availableGeometry().width();
QPixmap pm;
if (pixmap.width() > screenWidth) {
pm = pixmap.scaledToWidth(screenWidth, Qt::SmoothTransformation);
} else {
pm = pixmap;
}
QSplashScreen::setPixmap(pm);
};
SDRangelSplash::~SDRangelSplash()