PerScreenDpi | QLabels incorrectly handle scale for icons (#4070)
* Fixes to icon generation. Generating a pixmap out of a size won't take the screen scaling factor into account, resulting in blurry results. Note that this is not a catchall solution, every case needs to be addressed manually. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * HighDpi fixes for startup splashscreen and About dialog Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Add helper function to generate appropriate pixmaps for a screen based on its dpi settings. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
// AzQtComponents
|
||||
#include <AzQtComponents/Components/Widgets/CheckBox.h>
|
||||
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
|
||||
#include <AzQtComponents/Utilities/PixmapScaleUtilities.h>
|
||||
|
||||
// Editor
|
||||
#include "Settings.h"
|
||||
@@ -79,8 +80,11 @@ WelcomeScreenDialog::WelcomeScreenDialog(QWidget* pParent)
|
||||
{
|
||||
projectPreviewPath = ":/WelcomeScreenDialog/DefaultProjectImage.png";
|
||||
}
|
||||
|
||||
ui->activeProjectIcon->setPixmap(
|
||||
QPixmap(projectPreviewPath).scaled(
|
||||
AzQtComponents::ScalePixmapForScreenDpi(
|
||||
QPixmap(projectPreviewPath),
|
||||
screen(),
|
||||
ui->activeProjectIcon->size(),
|
||||
Qt::KeepAspectRatioByExpanding,
|
||||
Qt::SmoothTransformation
|
||||
|
||||
Reference in New Issue
Block a user