Update Splashscreen and About Us dialogs for General Availability (#4901)
* Add new image for splashscreen. Layout changes incoming. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Adapt layouts to new splashscreen style with transparent background. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Ensure cropping logic works correctly when screen scaling is used. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Remove old image. Replace new image with new version with more readable credits. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -6,10 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "AboutDialog.h"
|
||||
|
||||
// Qt
|
||||
@@ -47,14 +44,17 @@ CAboutDialog::CAboutDialog(QString versionText, QString richTextCopyrightNotice,
|
||||
CAboutDialog > QLabel#link { text-decoration: underline; color: #94D2FF; }");
|
||||
|
||||
// Prepare background image
|
||||
m_backgroundImage = AzQtComponents::ScalePixmapForScreenDpi(
|
||||
QPixmap(QStringLiteral(":/StartupLogoDialog/splashscreen_background_developer_preview.jpg")),
|
||||
screen(),
|
||||
QSize(m_enforcedWidth, m_enforcedHeight),
|
||||
QPixmap image = AzQtComponents::ScalePixmapForScreenDpi(
|
||||
QPixmap(QStringLiteral(":/StartupLogoDialog/splashscreen_background_2021_11.jpg")),
|
||||
screen(), QSize(m_imageWidth, m_imageHeight),
|
||||
Qt::IgnoreAspectRatio,
|
||||
Qt::SmoothTransformation
|
||||
);
|
||||
|
||||
// Crop image to cut out transparent border
|
||||
QRect cropRect((m_imageWidth - m_enforcedWidth) / 2, (m_imageHeight - m_enforcedHeight) / 2, m_enforcedWidth, m_enforcedHeight);
|
||||
m_backgroundImage = AzQtComponents::CropPixmapForScreenDpi(image, screen(), cropRect);
|
||||
|
||||
// Draw the Open 3D Engine logo from svg
|
||||
m_ui->m_logo->load(QStringLiteral(":/StartupLogoDialog/o3de_logo.svg"));
|
||||
|
||||
|
||||
@@ -38,7 +38,9 @@ private:
|
||||
QScopedPointer<Ui::CAboutDialog> m_ui;
|
||||
QPixmap m_backgroundImage;
|
||||
|
||||
int m_enforcedWidth = 600;
|
||||
int m_enforcedHeight = 400;
|
||||
const int m_imageWidth = 668;
|
||||
const int m_imageHeight = 368;
|
||||
const int m_enforcedWidth = 600;
|
||||
const int m_enforcedHeight = 300;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>360</height>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -19,13 +19,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>360</height>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>360</height>
|
||||
<width>608</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -69,7 +69,7 @@
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>12</number>
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>12</number>
|
||||
@@ -125,7 +125,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Developer Preview</string>
|
||||
<string>General Availability</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
|
||||
@@ -34,11 +34,12 @@ CStartupLogoDialog::CStartupLogoDialog(QString versionText, QString richTextCopy
|
||||
m_ui->setupUi(this);
|
||||
|
||||
s_pLogoWindow = this;
|
||||
setFixedSize(QSize(600, 300));
|
||||
setFixedSize(QSize(m_enforcedWidth, m_enforcedHeight));
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
|
||||
// Prepare background image
|
||||
m_backgroundImage = AzQtComponents::ScalePixmapForScreenDpi(
|
||||
QPixmap(QStringLiteral(":/StartupLogoDialog/splashscreen_background_developer_preview.jpg")),
|
||||
QPixmap(QStringLiteral(":/StartupLogoDialog/splashscreen_background_2021_11.jpg")),
|
||||
screen(),
|
||||
QSize(m_enforcedWidth, m_enforcedHeight),
|
||||
Qt::IgnoreAspectRatio,
|
||||
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
QScopedPointer<Ui::StartupLogoDialog> m_ui;
|
||||
|
||||
QPixmap m_backgroundImage;
|
||||
const int m_enforcedWidth = 600;
|
||||
const int m_enforcedHeight = 300;
|
||||
const int m_enforcedWidth = 668;
|
||||
const int m_enforcedHeight = 368;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/StartupLogoDialog">
|
||||
<file>o3de_logo.svg</file>
|
||||
<file>splashscreen_background_developer_preview.jpg</file>
|
||||
<file>splashscreen_background_2021_11.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -6,13 +6,22 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>300</height>
|
||||
<width>668</width>
|
||||
<height>368</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>42</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>42</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
<number>42</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
@@ -29,7 +38,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<width>300</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -53,7 +62,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>28</number>
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>24</number>
|
||||
@@ -94,7 +103,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Developer Preview</string>
|
||||
<string>General Availability</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -153,20 +162,28 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>290</width>
|
||||
<height>0</height>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>290</width>
|
||||
<height>16777215</height>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Starting Editor...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ffcb7614bed0790bf58a2bb7b2d70958289cb2edf562acc8fc841f4c50a55445
|
||||
size 2974586
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7105ec99477f124a8ac8d588f2dfc4ee7bb54f39386c8131b7703c86754c0cb8
|
||||
size 248690
|
||||
@@ -28,4 +28,21 @@ namespace AzQtComponents
|
||||
|
||||
return scaledPixmap;
|
||||
}
|
||||
|
||||
QPixmap CropPixmapForScreenDpi(
|
||||
QPixmap pixmap, QScreen* screen, QRect rect)
|
||||
{
|
||||
qreal screenDpiFactor = QHighDpiScaling::factor(screen);
|
||||
pixmap.setDevicePixelRatio(screenDpiFactor);
|
||||
|
||||
QRect cropRect(
|
||||
aznumeric_cast<int>(aznumeric_cast<qreal>(rect.left()) * screenDpiFactor),
|
||||
aznumeric_cast<int>(aznumeric_cast<qreal>(rect.top()) * screenDpiFactor),
|
||||
aznumeric_cast<int>(aznumeric_cast<qreal>(rect.width()) * screenDpiFactor),
|
||||
aznumeric_cast<int>(aznumeric_cast<qreal>(rect.height()) * screenDpiFactor)
|
||||
);
|
||||
|
||||
QPixmap croppedPixmap = pixmap.copy(cropRect);
|
||||
return croppedPixmap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
#include <AzQtComponents/AzQtComponentsAPI.h>
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
AZ_QT_COMPONENTS_API QPixmap ScalePixmapForScreenDpi(QPixmap pixmap, QScreen* screen, QSize size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformationMode);
|
||||
AZ_QT_COMPONENTS_API QPixmap CropPixmapForScreenDpi(QPixmap pixmap, QScreen* screen, QRect rect);
|
||||
}; // namespace AzQtComponents
|
||||
|
||||
Reference in New Issue
Block a user