forked from qt-creator/qt-creator
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:
@@ -32,7 +32,8 @@ import QtQuick.Shapes 1.0
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: welcome_splash
|
id: welcome_splash
|
||||||
anchors.fill: parent
|
width: 600
|
||||||
|
height: 720
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
@@ -55,8 +56,6 @@ Rectangle {
|
|||||||
property bool doNotShowAgain: true
|
property bool doNotShowAgain: true
|
||||||
property bool loadingPlugins: true
|
property bool loadingPlugins: true
|
||||||
|
|
||||||
width: 600
|
|
||||||
height: 720
|
|
||||||
visible: true
|
visible: true
|
||||||
color: "#1d212a"
|
color: "#1d212a"
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,13 @@ import QtQuick 2.0
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
width: 600
|
width: 600 * root.mainScale
|
||||||
height: 720
|
height: 720 * root.mainScale
|
||||||
|
|
||||||
|
property int maxHeight: Screen.desktopAvailableHeight - 100
|
||||||
|
|
||||||
|
property real mainScale: root.maxHeight > 720 ? 1 : root.maxHeight / 720
|
||||||
|
|
||||||
|
|
||||||
signal closeClicked
|
signal closeClicked
|
||||||
signal checkBoxToggled
|
signal checkBoxToggled
|
||||||
@@ -42,9 +47,10 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Welcome_splash {
|
Welcome_splash {
|
||||||
|
scale: root.mainScale
|
||||||
id: welcome_splash
|
id: welcome_splash
|
||||||
x: 0
|
|
||||||
y: 0
|
transformOrigin: Item.TopLeft
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
onCloseClicked: root.closeClicked()
|
onCloseClicked: root.closeClicked()
|
||||||
onConfigureClicked: root.configureClicked()
|
onConfigureClicked: root.configureClicked()
|
||||||
|
|||||||
Reference in New Issue
Block a user