Project Manager: Added Per Project Template Previews and Icon Overlays (#1994)

* Project Manager: Added Per Project Template Previews and Icon Overlays

Signed-off-by: nggieber <nggieber@amazon.com>

* Remove template icon overlays and bake them into template preview

Signed-off-by: nggieber <nggieber@amazon.com>

* Remove unused variables and headers

Signed-off-by: nggieber <nggieber@amazon.com>
main
AMZN-nggieber 4 years ago committed by GitHub
parent 097dc25424
commit 5b44ea9b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@
*/
#include <NewProjectSettingsScreen.h>
#include <ProjectManagerDefs.h>
#include <PythonBindingsInterface.h>
#include <FormBrowseEditWidget.h>
#include <FormLineEditWidget.h>
@ -117,7 +118,7 @@ namespace O3DE::ProjectManager
for (int index = 0; index < m_templates.size(); ++index)
{
ProjectTemplateInfo projectTemplate = m_templates.at(index);
QString projectPreviewPath = projectTemplate.m_path + "/Template/preview.png";
QString projectPreviewPath = QDir(projectTemplate.m_path).filePath(ProjectPreviewImagePath);
QFileInfo doesPreviewExist(projectPreviewPath);
if (!doesPreviewExist.exists() || !doesPreviewExist.isFile())
{

@ -12,6 +12,7 @@ namespace O3DE::ProjectManager
{
inline constexpr static int ProjectPreviewImageWidth = 210;
inline constexpr static int ProjectPreviewImageHeight = 280;
inline constexpr static int ProjectTemplateImageWidth = 92;
static const QString ProjectBuildPathPostfix = "build/windows_vs2019";
static const QString ProjectBuildPathCmakeFiles = "CMakeFiles";

@ -6,6 +6,7 @@
*/
#include <TemplateButtonWidget.h>
#include <ProjectManagerDefs.h>
#include <QVBoxLayout>
#include <QLabel>
@ -16,7 +17,6 @@
namespace O3DE::ProjectManager
{
TemplateButton::TemplateButton(const QString& imagePath, const QString& labelText, QWidget* parent)
: QPushButton(parent)
{
@ -31,8 +31,8 @@ namespace O3DE::ProjectManager
QLabel* image = new QLabel(this);
image->setObjectName("templateImage");
image->setPixmap(
QPixmap(imagePath).scaled(QSize(s_templateImageWidth,s_templateImageHeight) , Qt::KeepAspectRatio, Qt::SmoothTransformation));
image->setPixmap(QPixmap(imagePath).scaled(
QSize(ProjectTemplateImageWidth, ProjectTemplateImageWidth), Qt::KeepAspectRatio, Qt::SmoothTransformation));
vLayout->addWidget(image);
QLabel* label = new QLabel(labelText, this);

@ -24,9 +24,5 @@ namespace O3DE::ProjectManager
protected slots:
void onToggled();
private:
inline constexpr static int s_templateImageWidth = 92;
inline constexpr static int s_templateImageHeight = 122;
};
} // namespace O3DE::ProjectManager

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ae503ec99c8358991dc3c6e50737844d3602b81a49abbbed7d697d7238547c0
size 28026

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c14254e4c822fb50bfec42691c49f1089ab020a873c366f71168390d3705c6e
size 17522
Loading…
Cancel
Save