LYN-4920 | The project image on the welcome page is disconnected from the Project manager (#1738)
* Display the correct project preview image in the Editor's Welcome Dialog. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Minor fixes to variable naming for clarity. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -75,6 +75,21 @@ WelcomeScreenDialog::WelcomeScreenDialog(QWidget* pParent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
// Set the project preview image
|
||||
QString projectPreviewPath = QDir(AZ::Utils::GetProjectPath().c_str()).filePath("preview.png");
|
||||
QFileInfo projectPreviewPathInfo(projectPreviewPath);
|
||||
if (!projectPreviewPathInfo.exists() || !projectPreviewPathInfo.isFile())
|
||||
{
|
||||
projectPreviewPath = ":/WelcomeScreenDialog/DefaultProjectImage.png";
|
||||
}
|
||||
ui->activeProjectIcon->setPixmap(
|
||||
QPixmap(projectPreviewPath).scaled(
|
||||
ui->activeProjectIcon->size(),
|
||||
Qt::KeepAspectRatioByExpanding,
|
||||
Qt::SmoothTransformation
|
||||
)
|
||||
);
|
||||
|
||||
ui->recentLevelTable->setColumnCount(3);
|
||||
ui->recentLevelTable->setMouseTracking(true);
|
||||
ui->recentLevelTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
Reference in New Issue
Block a user