Files
pallectrum/electrum/gui/qml/components/LoadingWalletDialog.qml
f321x f1dfe5e248 qml: LoadingWalletDialog: add some padding
add some padding at the bottom of the LoadingWalletDialog so the
spinning circle is not directly at the bottom of the dialog, looks a bit
nicer this way.
2025-08-27 15:17:19 +02:00

59 lines
1.2 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Controls.Material
import org.electrum 1.0
import "controls"
ElDialog {
id: dialog
title: qsTr('Loading Wallet')
iconSource: Qt.resolvedUrl('../../icons/wallet.png')
resizeWithKeyboard: false
x: Math.floor((parent.width - implicitWidth) / 2)
y: Math.floor((parent.height - implicitHeight) / 2)
// anchors.centerIn: parent // this strangely pixelates the spinner
needsSystemBarPadding: false
function open() {
showTimer.start()
}
ColumnLayout {
width: parent.width
BusyIndicator {
Layout.alignment: Qt.AlignHCenter
running: Daemon.loading
}
Item {
Layout.preferredHeight: 20
}
}
Connections {
target: Daemon
function onLoadingChanged() {
console.log('daemon loading ' + Daemon.loading)
if (!Daemon.loading) {
showTimer.stop()
dialog.close()
}
}
}
Timer {
id: showTimer
interval: 250
repeat: false
onTriggered: dialog.visible = true
}
}