Browse Source

qml: remove qml splash, update python-for-android with splash support.

main.qml now shows black cover that fades out when app is ready.
master
Sander van Grieken 3 years ago
parent
commit
9704dab68b
  1. 2
      contrib/android/Dockerfile
  2. 16
      electrum/gui/qml/components/Splash.qml
  3. 26
      electrum/gui/qml/components/main.qml

2
contrib/android/Dockerfile

@ -179,7 +179,7 @@ RUN cd /opt \
&& git remote add accumulator https://github.com/accumulator/python-for-android \
&& git fetch --all \
# commit: from branch accumulator/electrum_20210421d
&& git checkout "fb8f6fc44ef7465500c534186b0aba2a5e4ddc15^{commit}" \
&& git checkout "e1111e82b7321d8e555bf67951525bb2381de789^{commit}" \
&& python3 -m pip install --no-build-isolation --no-dependencies --user -e .
# build env vars

16
electrum/gui/qml/components/Splash.qml

@ -1,16 +0,0 @@
import QtQuick 2.0
Item {
property bool toolbar: false
Rectangle {
anchors.fill: parent
color: '#111144'
}
Image {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "../../icons/electrum.png"
}
}

26
electrum/gui/qml/components/main.qml

@ -11,7 +11,8 @@ import "controls"
ApplicationWindow
{
id: app
visible: true
visible: false // initial value
// dimensions ignored on android
width: 480
@ -148,22 +149,27 @@ ApplicationWindow
}
Timer {
id: splashTimer
id: coverTimer
interval: 10
onTriggered: {
splash.opacity = 0
app.visible = true
cover.opacity = 0
}
}
Splash {
id: splash
anchors.top: header.top
anchors.bottom: app.contentItem.bottom
width: app.width
Rectangle {
id: cover
parent: Overlay.overlay
anchors.fill: parent
z: 1000
color: 'black'
Behavior on opacity {
NumberAnimation { duration: 300 }
NumberAnimation {
duration: 2000
easing.type: Easing.OutQuad;
}
}
}
@ -239,7 +245,7 @@ ApplicationWindow
}
Component.onCompleted: {
splashTimer.start()
coverTimer.start()
if (!Config.autoConnectDefined) {
var dialog = serverConnectWizard.createObject(app)

Loading…
Cancel
Save