Skip to content

Commit

Permalink
Fix app splashscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Jul 9, 2024
1 parent cc74322 commit c90b2ee
Showing 1 changed file with 36 additions and 26 deletions.
62 changes: 36 additions & 26 deletions qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -333,41 +333,49 @@ ApplicationWindow {
id: appSplashLoader
anchors.fill: parent

z: 20
active: true
asynchronous: false
sourceComponent: Rectangle {
id: appSplash
anchors.centerIn: parent
color: Theme.colorBackground

sourceComponent: Item {

function fadeout() {
appSplash.width = 0
appSplashImage.opacity = 0
ttt.start()
}
Timer {
id: ttt
interval: 1000
running: false
repeat: false
onTriggered: {
appSplashLoader.sourceComponent = undefined
}
splashTimer_unload.start()
}

width: appSplashLoader.width*2
height: width
radius: width
Behavior on width { NumberAnimation { duration: 666; } }

Image {
id: appSplashImage
Rectangle {
id: appSplash
anchors.centerIn: parent
width: 256
height: 256
source: "qrc:/gfx/offloadbuddy.svg"
sourceSize: Qt.size(width, height)
color: Theme.colorBackground

Timer {
id: splashTimer_unload
running: false
repeat: false
interval: 1000
onTriggered: {
appSplashLoader.sourceComponent = undefined
}
}

Behavior on opacity { OpacityAnimator { duration: 666; } }
clip: true
width: appWindow.width*2
height: width
radius: width
Behavior on width { NumberAnimation { duration: 500; } }

Image {
id: appSplashImage
anchors.centerIn: parent
width: 256
height: 256
source: "qrc:/gfx/offloadbuddy.svg"
sourceSize: Qt.size(width, height)

Behavior on opacity { OpacityAnimator { duration: 666; } }
}
}
}
}
Expand All @@ -393,4 +401,6 @@ ApplicationWindow {
popupExit_loader.item.open()
}
}

////////////////////////////////////////////////////////////////////////////
}

0 comments on commit c90b2ee

Please sign in to comment.