diff options
author | Slobodan Vrkacevic <slobodan@froglogic.com> | 2016-01-21 17:33:02 +0100 |
---|---|---|
committer | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-02-15 05:42:16 +0000 |
commit | 966f195fbc4cb341f29d9d9f4a6eb0a5748262c9 (patch) | |
tree | a5aa30bde357b3b41ac61aa87c2fa0551e089fe1 /src/libs/installer/packagemanagergui.cpp | |
parent | 6277c86f9bd306019fd06419b92c765d4d44dc4d (diff) |
Resize banner image to fit default installer width
When the Modern wizard style is used, the size of the banner picture
limits the width of the installer and that's a problem on high DPI
displays. Scaling and resizing of the UI does not work correctly in that
case. Also the WizardDefaultWidth option from config.xml is ignored
completely.
Let's try to solve this by resizing the banner image to fit the
installers default width. This is technically not backwards compatible
(existing installers may suddenly appear to be much more narrow or wide
than before) but makes the installer work much better on high DPI
displays in which case the fonts tends to be very big (in terms of
pixels) and the banner image looks very small.
If the old behavior is needed, setting the 'WizardDefaultWidth' value to
be equal to the width of the banner image will do the job.
Change-Id: Ib311df3bbc277c328e015c1095ae4d35663c42e1
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 34e1471ae..8eaa522c4 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -1063,7 +1063,10 @@ QPixmap PackageManagerPage::watermarkPixmap() const */ QPixmap PackageManagerPage::bannerPixmap() const { - return QPixmap(m_core->value(QLatin1String("BannerPixmap"))); + QPixmap banner(m_core->value(QLatin1String("BannerPixmap"))); + + return banner.scaledToWidth(m_core->settings().wizardDefaultWidth(), + Qt::SmoothTransformation); } /*! |