mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
4ee21ada05
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
79 lines
2.0 KiB
QML
79 lines
2.0 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
|
|
import utils 1.0
|
|
import "../../../shared"
|
|
|
|
ModalPopup {
|
|
property alias selectedAccount: accountSelector.selectedAccount
|
|
id: popup
|
|
|
|
//% "Receive"
|
|
title: qsTrId("receive")
|
|
height: 500
|
|
width: 500
|
|
|
|
|
|
Rectangle {
|
|
id: qrCodeBox
|
|
height: 240
|
|
width: 240
|
|
anchors.top: parent.top
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
radius: Style.current.radius
|
|
border.width: 1
|
|
border.color: Style.current.border
|
|
|
|
Image {
|
|
id: qrCodeImage
|
|
asynchronous: true
|
|
fillMode: Image.PreserveAspectFit
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
height: parent.height - Style.current.padding
|
|
width: parent.width - Style.current.padding
|
|
mipmap: true
|
|
smooth: false
|
|
}
|
|
}
|
|
|
|
AccountSelector {
|
|
id: accountSelector
|
|
label: ""
|
|
showAccountDetails: false
|
|
accounts: walletModel.accountsView.accounts
|
|
currency: walletModel.balanceView.defaultCurrency
|
|
anchors.top: qrCodeBox.bottom
|
|
anchors.topMargin: Style.current.padding
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
width: 240
|
|
dropdownWidth: parent.width - (Style.current.padding * 2)
|
|
dropdownAlignment: Select.MenuAlignment.Center
|
|
onSelectedAccountChanged: {
|
|
if (selectedAccount.address) {
|
|
qrCodeImage.source = profileModel.qrCode(selectedAccount.address)
|
|
txtWalletAddress.text = selectedAccount.address
|
|
}
|
|
}
|
|
}
|
|
|
|
Input {
|
|
id: txtWalletAddress
|
|
//% "Wallet address"
|
|
label: qsTrId("wallet-address")
|
|
anchors.top: accountSelector.bottom
|
|
anchors.topMargin: Style.current.padding
|
|
copyToClipboard: true
|
|
textField.readOnly: true
|
|
customHeight: 56
|
|
}
|
|
|
|
}
|
|
|
|
/*##^##
|
|
Designer {
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
}
|
|
##^##*/
|
|
|