96 lines
2.2 KiB
QML
96 lines
2.2 KiB
QML
import QtQuick 2.3
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.3
|
|
import Qt.labs.platform 1.1
|
|
import "../../../../imports"
|
|
import "../../../../shared"
|
|
|
|
Item {
|
|
id: element
|
|
property string currency: "USD"
|
|
|
|
Text {
|
|
id: modalDialogTitle
|
|
text: "Settings"
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
font.bold: true
|
|
font.pixelSize: 17
|
|
anchors.leftMargin: 16
|
|
anchors.topMargin: 16
|
|
}
|
|
|
|
Image {
|
|
id: closeModalImg
|
|
anchors.top: parent.top
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 16
|
|
anchors.topMargin: 16
|
|
source: "../../../img/close.svg"
|
|
MouseArea {
|
|
id: closeModalMouseArea
|
|
cursorShape: Qt.PointingHandCursor
|
|
anchors.fill: parent
|
|
onClicked: {
|
|
popup.close()
|
|
}
|
|
}
|
|
}
|
|
|
|
Separator {
|
|
id: headerSeparator
|
|
anchors.top: modalDialogTitle.bottom
|
|
}
|
|
|
|
Item {
|
|
id: modalBody
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 32
|
|
anchors.top: headerSeparator.bottom
|
|
anchors.topMargin: Theme.padding
|
|
anchors.bottom: footerSeparator.top
|
|
anchors.bottomMargin: 16
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 32
|
|
|
|
Input {
|
|
id: txtCurrency
|
|
label: "Currency"
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 0
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 0
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 0
|
|
placeholderText: qsTr("USD")
|
|
text: currency
|
|
}
|
|
|
|
}
|
|
|
|
Separator {
|
|
id: footerSeparator
|
|
anchors.bottom: parent.bottom
|
|
anchors.bottomMargin: 76
|
|
}
|
|
|
|
StyledButton {
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Theme.padding
|
|
label: "Save"
|
|
anchors.bottom: parent.bottom
|
|
anchors.bottomMargin: Theme.padding
|
|
onClicked: {
|
|
console.log(txtCurrency.textField.text)
|
|
assetsModel.setDefaultCurrency(txtCurrency.textField.text)
|
|
popup.close()
|
|
}
|
|
}
|
|
}
|
|
|
|
/*##^##
|
|
Designer {
|
|
D{i:0;autoSize:true;height:480;width:640}
|
|
}
|
|
##^##*/
|