base of changes to wallet
This commit is contained in:
parent
01f7449508
commit
084c96afff
|
@ -6,277 +6,87 @@ import Qt.labs.platform 1.1
|
||||||
import "../../../imports"
|
import "../../../imports"
|
||||||
import "../../../shared"
|
import "../../../shared"
|
||||||
|
|
||||||
ColumnLayout {
|
Column {
|
||||||
readonly property int w: 340
|
|
||||||
property alias currentTab: walletScreenButtons.currentIndex
|
|
||||||
|
|
||||||
id: walletInfoContainer
|
id: walletInfoContainer
|
||||||
width: w
|
width: 340
|
||||||
spacing: 0
|
spacing: 0
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 0
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 0
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 0
|
|
||||||
|
|
||||||
RowLayout {
|
Text {
|
||||||
id: walletHeader
|
id: title
|
||||||
height: 375
|
x: 143
|
||||||
Layout.fillWidth: true
|
y: 16
|
||||||
width: walletInfoContainer.w
|
text: qsTr("Wallet")
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Theme.padding
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
font.weight: Font.Bold
|
||||||
|
font.pixelSize: 17
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
id: walletHeaderContent
|
id: walletValueTextContainer
|
||||||
color: Theme.blue
|
anchors.left: parent.left
|
||||||
height: 375
|
anchors.leftMargin: Theme.padding
|
||||||
Layout.fillWidth: true
|
anchors.top: title.bottom
|
||||||
|
anchors.topMargin: Theme.padding
|
||||||
|
|
||||||
Item {
|
TextEdit {
|
||||||
id: walletValueTextContainer
|
id: walletAmountValue
|
||||||
x: 140
|
color: "black"
|
||||||
width: 175
|
text: qsTr("408.30 USD")
|
||||||
height: 40
|
selectByMouse: true
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
cursorVisible: true
|
||||||
anchors.top: parent.top
|
readOnly: true
|
||||||
anchors.topMargin: 110
|
anchors.left: tild.right
|
||||||
|
anchors.leftMargin: 1
|
||||||
|
font.weight: Font.Medium
|
||||||
|
font.pixelSize: 30
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: tild
|
id: totalValue
|
||||||
color: Theme.lightBlueText
|
color: Theme.darkGrey
|
||||||
text: qsTr("~")
|
text: "Total value"
|
||||||
font.weight: Font.Medium
|
anchors.left: walletAmountValue.left
|
||||||
font.pixelSize: 30
|
anchors.leftMargin: 0
|
||||||
}
|
anchors.top: walletAmountValue.bottom
|
||||||
|
anchors.topMargin: 0
|
||||||
TextEdit {
|
font.weight: Font.Medium
|
||||||
id: walletAmountValue
|
font.pixelSize: 13
|
||||||
color: "#ffffff"
|
|
||||||
text: qsTr("408.30")
|
|
||||||
selectByMouse: true
|
|
||||||
cursorVisible: true
|
|
||||||
readOnly: true
|
|
||||||
anchors.left: tild.right
|
|
||||||
anchors.leftMargin: 1
|
|
||||||
font.weight: Font.Medium
|
|
||||||
font.pixelSize: 30
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: currencyText
|
|
||||||
color: Theme.lightBlueText
|
|
||||||
text: qsTr("USD")
|
|
||||||
anchors.left: walletAmountValue.right
|
|
||||||
anchors.leftMargin: 5
|
|
||||||
font.weight: Font.Medium
|
|
||||||
font.pixelSize: 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TabBar {
|
|
||||||
readonly property int btnHeight: 56
|
|
||||||
|
|
||||||
id: walletScreenButtons
|
|
||||||
width: walletInfoContainer.w
|
|
||||||
height: btnHeight*3
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 0
|
|
||||||
currentIndex: 0
|
|
||||||
spacing: 0
|
|
||||||
background: Rectangle {
|
|
||||||
color: "#00000000"
|
|
||||||
}
|
|
||||||
|
|
||||||
TabButton {
|
|
||||||
id: sendTabButton
|
|
||||||
width: walletInfoContainer.w
|
|
||||||
height: walletScreenButtons.btnHeight
|
|
||||||
text: ""
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 0
|
|
||||||
background: Rectangle {
|
|
||||||
color: parent.checked ? Theme.darkBlue : Theme.transparent
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: element
|
|
||||||
color: "#ffffff"
|
|
||||||
text: qsTr("Send")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 72
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.weight: Font.Bold
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RoundedIcon {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 18
|
|
||||||
imgPath: "../../img/diagonalArrow.svg"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
size: 36
|
|
||||||
bg: "#19ffffff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TabButton {
|
|
||||||
id: depositTabButton
|
|
||||||
width: walletInfoContainer.w
|
|
||||||
height: walletScreenButtons.btnHeight
|
|
||||||
text: ""
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 0
|
|
||||||
anchors.topMargin: 0
|
|
||||||
anchors.top: sendTabButton.bottom
|
|
||||||
background: Rectangle {
|
|
||||||
color: parent.checked ? Theme.darkBlue : Theme.transparent
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: element2
|
|
||||||
color: "#ffffff"
|
|
||||||
text: qsTr("Deposit")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 72
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.weight: Font.Bold
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RoundedIcon {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 18
|
|
||||||
imgPath: "../../img/diagonalArrowDown.svg"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
size: 36
|
|
||||||
bg: "#19ffffff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TabButton {
|
|
||||||
id: txHistoryTabButton
|
|
||||||
width: walletInfoContainer.w
|
|
||||||
height: walletScreenButtons.btnHeight
|
|
||||||
text: ""
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 0
|
|
||||||
anchors.topMargin: 0
|
|
||||||
anchors.top: depositTabButton.bottom
|
|
||||||
background: Rectangle {
|
|
||||||
color: parent.checked ? Theme.darkBlue : Theme.transparent
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: element3
|
|
||||||
color: "#ffffff"
|
|
||||||
text: qsTr("Transaction History")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 72
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.weight: Font.Bold
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RoundedIcon {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 18
|
|
||||||
imgPath: "../../img/list.svg"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
size: 36
|
|
||||||
bg: "#19ffffff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
// TODO change this with a reused Component
|
||||||
id: assetInfoContainer
|
Rectangle {
|
||||||
Layout.fillHeight: true
|
id: addWalletBtn
|
||||||
Layout.fillWidth: true
|
width: 36
|
||||||
|
height: 36
|
||||||
|
color: Theme.blue
|
||||||
|
radius: 50
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: Theme.padding
|
||||||
|
anchors.top: walletValueTextContainer.bottom
|
||||||
|
anchors.topMargin: 0
|
||||||
|
|
||||||
Rectangle {
|
Text {
|
||||||
id: walletSendBg
|
id: addChatLbl
|
||||||
color: "#ffffff"
|
color: "#ffffff"
|
||||||
Layout.fillHeight: true
|
text: qsTr("+")
|
||||||
Layout.fillWidth: true
|
anchors.verticalCenterOffset: -1
|
||||||
|
anchors.horizontalCenterOffset: 1
|
||||||
Text {
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
id: assetsTitle
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: Theme.darkGrey
|
lineHeight: 1
|
||||||
text: qsTr("Assets")
|
fontSizeMode: Text.FixedSize
|
||||||
anchors.left: parent.left
|
font.bold: true
|
||||||
anchors.leftMargin: Theme.padding
|
font.pixelSize: 28
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: Theme.smallPadding
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: assetViewDelegate
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: element6
|
|
||||||
height: 56
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 0
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 0
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: assetInfoContainer
|
|
||||||
width: 36
|
|
||||||
height: 36
|
|
||||||
source: image
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: Theme.padding
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: assetValue
|
|
||||||
text: value
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.pixelSize: 14
|
|
||||||
font.strikeout: false
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 72
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: assetSymbol
|
|
||||||
text: symbol
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
color: Theme.darkGrey
|
|
||||||
font.pixelSize: 14
|
|
||||||
anchors.right: assetFiatValue.left
|
|
||||||
anchors.rightMargin: 10
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
id: assetFiatValue
|
|
||||||
color: Theme.darkGrey
|
|
||||||
text: fiatValue
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.pixelSize: 14
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: Theme.padding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: listView
|
|
||||||
anchors.topMargin: 36
|
|
||||||
anchors.fill: parent
|
|
||||||
model: assetsModel.assets
|
|
||||||
delegate: assetViewDelegate
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*##^##
|
/*##^##
|
||||||
Designer {
|
Designer {
|
||||||
D{i:0;formeditorZoom:0.8999999761581421;height:770;width:340}
|
D{i:0;formeditorColor:"#ffffff";formeditorZoom:0.75;height:770;width:340}D{i:2;anchors_x:82}
|
||||||
}
|
}
|
||||||
##^##*/
|
##^##*/
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,10 @@ import "../../../imports"
|
||||||
import "../../../shared"
|
import "../../../shared"
|
||||||
import "."
|
import "."
|
||||||
|
|
||||||
Item {
|
SplitView {
|
||||||
id: walletView
|
id: walletView
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
property alias walletContainerCurrentIndex: walletContainer.currentIndex
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
// Those anchors show a warning too, but whithout them, there is a gap on the right
|
// Those anchors show a warning too, but whithout them, there is a gap on the right
|
||||||
|
@ -24,7 +23,7 @@ Item {
|
||||||
id: leftTab
|
id: leftTab
|
||||||
}
|
}
|
||||||
|
|
||||||
StackLayout {
|
Item {
|
||||||
id: walletContainer
|
id: walletContainer
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
|
@ -34,12 +33,9 @@ Item {
|
||||||
anchors.rightMargin: 0
|
anchors.rightMargin: 0
|
||||||
anchors.left: leftTab.right
|
anchors.left: leftTab.right
|
||||||
anchors.leftMargin: 0
|
anchors.leftMargin: 0
|
||||||
currentIndex: leftTab.currentTab
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: sendContainer
|
id: walletInfoContainer
|
||||||
width: 200
|
|
||||||
height: 200
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
@ -104,44 +100,91 @@ Item {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
RowLayout {
|
||||||
id: depositContainer
|
id: assetInfoContainer
|
||||||
width: 200
|
Layout.fillHeight: true
|
||||||
height: 200
|
Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
Text {
|
Rectangle {
|
||||||
id: element4
|
id: walletSendBg
|
||||||
text: qsTr("Deposit")
|
color: "#ffffff"
|
||||||
font.weight: Font.Bold
|
Layout.fillHeight: true
|
||||||
anchors.topMargin: 24
|
Layout.fillWidth: true
|
||||||
anchors.leftMargin: 24
|
|
||||||
font.pixelSize: 20
|
Text {
|
||||||
anchors.left: parent.left
|
id: assetsTitle
|
||||||
anchors.top: parent.top
|
color: Theme.darkGrey
|
||||||
|
text: qsTr("Assets")
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Theme.padding
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Theme.smallPadding
|
||||||
|
font.pixelSize: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: assetViewDelegate
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: element6
|
||||||
|
height: 56
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: assetInfoContainer
|
||||||
|
width: 36
|
||||||
|
height: 36
|
||||||
|
source: image
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Theme.padding
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: assetValue
|
||||||
|
text: value
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.strikeout: false
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 72
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: assetSymbol
|
||||||
|
text: symbol
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: Theme.darkGrey
|
||||||
|
font.pixelSize: 14
|
||||||
|
anchors.right: assetFiatValue.left
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
id: assetFiatValue
|
||||||
|
color: Theme.darkGrey
|
||||||
|
text: fiatValue
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: 14
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: Theme.padding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
id: listView
|
||||||
|
anchors.topMargin: 36
|
||||||
|
anchors.fill: parent
|
||||||
|
model: assetsModel.assets
|
||||||
|
delegate: assetViewDelegate
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: txHistoryContainer
|
|
||||||
width: 200
|
|
||||||
height: 200
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Text {
|
|
||||||
id: element5
|
|
||||||
text: qsTr("Transaction History")
|
|
||||||
font.weight: Font.Bold
|
|
||||||
anchors.topMargin: 24
|
|
||||||
anchors.leftMargin: 24
|
|
||||||
font.pixelSize: 20
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*##^##
|
/*##^##
|
||||||
|
|
Loading…
Reference in New Issue