Browse Source

qml: styling main view

master
Sander van Grieken 3 years ago
parent
commit
10e7d8d926
  1. 34
      electrum/gui/qml/components/WalletMainView.qml

34
electrum/gui/qml/components/WalletMainView.qml

@ -1,6 +1,7 @@
import QtQuick 2.6 import QtQuick 2.6
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.0
import QtQuick.Controls.Material 2.0
import QtQml 2.6 import QtQml 2.6
import org.electrum 1.0 import org.electrum 1.0
@ -118,20 +119,27 @@ Item {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
Button { Pane {
text: qsTr('Open/Create Wallet')
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
onClicked: { padding: 0
if (Daemon.availableWallets.rowCount() > 0) { background: Rectangle {
stack.push(Qt.resolvedUrl('Wallets.qml')) color: Material.dialogColor
} else { }
var newww = app.newWalletWizard.createObject(app) FlatButton {
newww.walletCreated.connect(function() { text: qsTr('Open/Create Wallet')
Daemon.availableWallets.reload() icon.source: '../../icons/wallet.png'
// and load the new wallet onClicked: {
Daemon.load_wallet(newww.path, newww.wizard_data['password']) if (Daemon.availableWallets.rowCount() > 0) {
}) stack.push(Qt.resolvedUrl('Wallets.qml'))
newww.open() } else {
var newww = app.newWalletWizard.createObject(app)
newww.walletCreated.connect(function() {
Daemon.availableWallets.reload()
// and load the new wallet
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
})
newww.open()
}
} }
} }
} }

Loading…
Cancel
Save