summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/aspectratiolabel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* AspectRatioLabel: center the pixmap by defaultArttu Tarkiainen2022-04-291-0/+1
| | | | | | | | This looks better when the pixmap cannot be scaled to the entire viewport because of its aspect ratio. Change-Id: I5826412124363ab38cb07dcc35ff5387e8baa380 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* AspectRatioLabel: prevent setting non-scaled pixmapsArttu Tarkiainen2022-04-211-1/+14
| | | | | | | | | | | | | | | | | The function signature for setting a pixmap for the label changed from 'setPixmap(const QPixmap &pixmap)' to 'setPixmapAndUrl(const QPixmap &pixmap, const QString &url)' when we enabled support for click URLs. Redefine (again) the base class QLabel::setPixmap() slot to make it harder for callers to set non-scaled pixmaps accidentally. This is still a bit bad however as it is possible to get different client-visible results by calling the method with a base class pointer. Task-number: QTIFW-2612 Change-Id: Ic79b3d71ffd5baf2108768ad3b867ddbcb33833b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add click option for product imageKatja Marttila2022-03-211-3/+36
| | | | | | | | | | Product image can now be clicked. It opens either url in Web browser or if file reference is given, then it will be opened with the suitable application. Task-number: QTIFW-2361 Change-Id: I59ed1355e90c23c8d0a5124779725825ca1ee2c8 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
* Fix scaling of high resolution images with AspectRatioLabelArttu Tarkiainen2021-10-211-3/+5
| | | | | Change-Id: I1f090be53caced09db655a310a57893e13e77eab Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix image aspect ratio not preserved when resizing windowArttu Tarkiainen2020-09-161-0/+98
As this is not currently possible using only QLabel, subclass it with a new AspectRatioLabel class to provide the functionality. This should be usable also on other places where we need scaling with aspect ratio maintaining. Task-number: QTIFW-1944 Change-Id: I32147b2b487573bb054fcf66b09eb3f8a0350ccd Reviewed-by: Katja Marttila <katja.marttila@qt.io>