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

View File

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

View File

@ -152,14 +152,23 @@ Item {
} }
} }
ListView { ScrollView {
id: listView
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.top: walletValueTextContainer.bottom anchors.top: walletValueTextContainer.bottom
anchors.topMargin: Style.current.padding anchors.topMargin: Style.current.padding
spacing: 5
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left 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
ListView {
id: listView
spacing: 5
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
delegate: walletDelegate delegate: walletDelegate
@ -189,7 +198,7 @@ Item {
model: walletModel.accounts model: walletModel.accounts
// model: exampleWalletModel // model: exampleWalletModel
} }
}
} }
/*##^## /*##^##

View File

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