Various ui fixes on wallet

- Show scrollbars in asset list if needed
- Show scrollbars in account list if needed
- Fix margin between assets
- Add symbol to asset amounts
- Stop scrolling at element bounds
This commit is contained in:
Richard Ramos 2020-11-27 09:49:57 -04:00 committed by Iuri Matias
parent dae7f9cd44
commit f88a05e2f5
4 changed files with 57 additions and 35 deletions

View File

@ -1,4 +1,6 @@
import QtQuick 2.13
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.14
import "../../../imports"
import "../../../shared"
@ -48,7 +50,7 @@ Item {
}
StyledText {
id: assetValue
text: value.toUpperCase()
text: value.toUpperCase() + " " + symbol
anchors.right: parent.right
anchors.rightMargin: 0
font.pixelSize: 15
@ -79,13 +81,22 @@ Item {
}
}
ListView {
id: assetListView
spacing: Style.current.halfPadding
ScrollView {
anchors.fill: parent
// model: exampleModel
model: walletModel.assets
delegate: assetViewDelegate
Layout.fillWidth: true
Layout.fillHeight: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: assetListView.contentHeight > assetListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
ListView {
id: assetListView
spacing: Style.current.padding * 2
anchors.fill: parent
// model: exampleModel
model: walletModel.assets
delegate: assetViewDelegate
boundsBehavior: Flickable.StopAtBounds
}
}
}
/*##^##

View File

@ -224,6 +224,7 @@ Item {
height: parent.height - extraButtons.height
width: parent.width
clip: true
boundsBehavior: Flickable.StopAtBounds
model: walletModel.transactions
delegate: transactionListItemCmp
ScrollBar.vertical: ScrollBar {

View File

@ -152,44 +152,53 @@ Item {
}
}
ListView {
id: listView
ScrollView {
anchors.bottom: parent.bottom
anchors.top: walletValueTextContainer.bottom
anchors.topMargin: Style.current.padding
spacing: 5
anchors.right: parent.right
anchors.left: parent.left
Layout.fillWidth: true
Layout.fillHeight: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: listView.contentHeight > listView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
delegate: walletDelegate
ListView {
id: listView
ListModel {
id: exampleWalletModel
ListElement {
name: "Status account"
address: "0xcfc9f08bbcbcb80760e8cb9a3c1232d19662fc6f"
balance: "12.00 USD"
iconColor: "#7CDA00"
spacing: 5
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
delegate: walletDelegate
ListModel {
id: exampleWalletModel
ListElement {
name: "Status account"
address: "0xcfc9f08bbcbcb80760e8cb9a3c1232d19662fc6f"
balance: "12.00 USD"
iconColor: "#7CDA00"
}
ListElement {
name: "Test account 1"
address: "0x2Ef1...E0Ba"
balance: "12.00 USD"
iconColor: "#FA6565"
}
ListElement {
name: "Status account"
address: "0x2Ef1...E0Ba"
balance: "12.00 USD"
iconColor: "#7CDA00"
}
}
ListElement {
name: "Test account 1"
address: "0x2Ef1...E0Ba"
balance: "12.00 USD"
iconColor: "#FA6565"
}
ListElement {
name: "Status account"
address: "0x2Ef1...E0Ba"
balance: "12.00 USD"
iconColor: "#7CDA00"
}
model: walletModel.accounts
// model: exampleWalletModel
}
model: walletModel.accounts
// model: exampleWalletModel
}
}
/*##^##

View File

@ -25,7 +25,8 @@ Item {
id: tokenListView
model: Currencies {}
ScrollBar.vertical: ScrollBar { active: true }
boundsBehavior: Flickable.StopAtBounds
delegate: Component {
Item {
anchors.right: parent.right