status-desktop/ui/app/AppLayouts/Wallet/components/SetCurrencyModalContent.qml

59 lines
1.4 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../../imports"
import "../../../../shared"
import "../data/"
Item {
property string currency: "USD"
2020-07-22 20:40:32 +00:00
id: modalBody
anchors.fill: parent
ButtonGroup {
id: currencyGroup
}
2020-07-22 20:40:32 +00:00
ListView {
anchors.top: parent.top
anchors.topMargin: 10
anchors.left: parent.left
2020-07-22 20:40:32 +00:00
anchors.right: parent.right
anchors.bottom: parent.bottom
clip: true
spacing: 10
id: tokenListView
model: Currencies {}
ScrollBar.vertical: ScrollBar { active: true }
delegate: Component {
Item {
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 10
width: parent.width
height: 52
StyledText {
text: name + " (" + code + ")"
font.pixelSize: 15
}
2020-07-22 20:40:32 +00:00
RadioButton {
checked: currency === key
anchors.right: parent.right
2020-07-22 20:40:32 +00:00
anchors.rightMargin: 4
ButtonGroup.group: currencyGroup
onClicked: { walletModel.setDefaultCurrency(key) }
}
}
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/