2020-05-28 15:38:00 +00:00
|
|
|
import QtQuick 2.3
|
|
|
|
import "../../../imports"
|
2020-05-28 14:54:42 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
Component {
|
|
|
|
id: assetViewDelegate
|
|
|
|
|
|
|
|
Item {
|
2020-05-28 15:38:00 +00:00
|
|
|
id: element
|
2020-05-28 14:54:42 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 0
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 0
|
2020-05-28 15:38:00 +00:00
|
|
|
height: 40
|
2020-05-28 14:54:42 +00:00
|
|
|
|
|
|
|
Image {
|
|
|
|
id: assetInfoImage
|
|
|
|
width: 36
|
|
|
|
height: 36
|
2020-06-08 13:55:18 +00:00
|
|
|
source: hasIcon ? "../../img/tokens/" + symbol + ".png" : "../../img/tokens/0-native.png"
|
2020-05-28 14:54:42 +00:00
|
|
|
anchors.left: parent.left
|
2020-05-28 15:38:00 +00:00
|
|
|
anchors.leftMargin: 0
|
2020-05-28 14:54:42 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: assetSymbol
|
|
|
|
text: symbol
|
2020-05-28 15:38:00 +00:00
|
|
|
anchors.left: assetInfoImage.right
|
|
|
|
anchors.leftMargin: Theme.smallPadding
|
|
|
|
anchors.top: assetInfoImage.top
|
|
|
|
anchors.topMargin: 0
|
|
|
|
color: Theme.black
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: assetFullTokenName
|
2020-06-02 20:10:48 +00:00
|
|
|
text: name
|
2020-05-28 15:38:00 +00:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 0
|
|
|
|
anchors.left: assetInfoImage.right
|
|
|
|
anchors.leftMargin: Theme.smallPadding
|
2020-05-28 14:54:42 +00:00
|
|
|
color: Theme.darkGrey
|
2020-05-28 15:38:00 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: assetValue
|
|
|
|
text: value
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 0
|
|
|
|
font.pixelSize: 15
|
|
|
|
font.strikeout: false
|
2020-05-28 14:54:42 +00:00
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: assetFiatValue
|
|
|
|
color: Theme.darkGrey
|
|
|
|
text: fiatValue
|
|
|
|
anchors.right: parent.right
|
2020-05-28 15:38:00 +00:00
|
|
|
anchors.rightMargin: 0
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 0
|
|
|
|
font.pixelSize: 15
|
2020-05-28 14:54:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-28 15:38:00 +00:00
|
|
|
ListModel {
|
|
|
|
id: exampleModel
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
value: "123 USD"
|
|
|
|
symbol: "ETH"
|
|
|
|
fullTokenName: "Ethereum"
|
|
|
|
fiatValue: "3423 ETH"
|
|
|
|
image: "../../img/token-icons/eth.svg"
|
|
|
|
}
|
|
|
|
}
|
2020-05-28 14:54:42 +00:00
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: assetListView
|
2020-05-28 15:38:00 +00:00
|
|
|
anchors.topMargin: 20
|
2020-05-28 14:54:42 +00:00
|
|
|
anchors.fill: parent
|
2020-05-28 15:38:00 +00:00
|
|
|
// model: exampleModel
|
2020-06-02 20:10:48 +00:00
|
|
|
model: walletModel.assets
|
2020-05-28 14:54:42 +00:00
|
|
|
delegate: assetViewDelegate
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640}
|
|
|
|
}
|
|
|
|
##^##*/
|