Skip to content

Commit

Permalink
Merge 112539c into defa7e4
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevCrow committed Mar 10, 2020
2 parents defa7e4 + 112539c commit e0b3468
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/ui/splash.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Window 2.12
import QtQuick.Layouts 1.12
import Qt.labs.settings 1.0

Window {
id: windowSplash
Expand All @@ -15,6 +16,8 @@ Window {
x: (Screen.width - width)/2
y: (Screen.height - height)/2

Material.theme: ~~settings.value("style/material/theme", Material.Light)

Dialog {
id: dialogSplash
anchors.centerIn: Overlay.overlay
Expand All @@ -30,12 +33,12 @@ Window {
onRejected: Qt.exit(-1)
onClosed: windowSplash.visible = false

width: 300
height: 300
// The width/height must be always greater than its implicit version:
// onAboutToShow: console.log("Size:", width + 'x' + height, "Implicit size:", implicitWidth + 'x' + implicitHeight)
width: implicitWidth + (implicitWidth % 2)
height: implicitHeight + (implicitHeight % 2)

ColumnLayout {
anchors.fill: parent

Image {
id: imageLogo
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Expand Down Expand Up @@ -94,4 +97,8 @@ Window {
repeat: false
onTriggered: dialogSplash.close()
}

Settings {
id: settings
}
}

0 comments on commit e0b3468

Please sign in to comment.