StudioWelcome: Scale down splash screen if it does not fit

If the splash screen does not fit on the screen we have to scale it down.

Task-number: QDS-7449
Change-Id: I73018563e9f863d3a8f60facf7599590fb602f0f
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Thomas Hartmann
2022-08-19 12:41:23 +02:00
parent 00679f2af2
commit dc8e13995a
2 changed files with 12 additions and 7 deletions

View File

@@ -32,7 +32,8 @@ import QtQuick.Shapes 1.0
Rectangle {
id: welcome_splash
anchors.fill: parent
width: 600
height: 720
clip: true
gradient: Gradient {
@@ -55,8 +56,6 @@ Rectangle {
property bool doNotShowAgain: true
property bool loadingPlugins: true
width: 600
height: 720
visible: true
color: "#1d212a"

View File

@@ -27,8 +27,13 @@ import QtQuick 2.0
Item {
id: root
width: 600
height: 720
width: 600 * root.mainScale
height: 720 * root.mainScale
property int maxHeight: Screen.desktopAvailableHeight - 100
property real mainScale: root.maxHeight > 720 ? 1 : root.maxHeight / 720
signal closeClicked
signal checkBoxToggled
@@ -42,9 +47,10 @@ Item {
}
Welcome_splash {
scale: root.mainScale
id: welcome_splash
x: 0
y: 0
transformOrigin: Item.TopLeft
antialiasing: true
onCloseClicked: root.closeClicked()
onConfigureClicked: root.configureClicked()