fix: fix wallet's tab bar issues

This commit is contained in:
Jonathan Rainville 2020-05-14 11:57:01 -04:00 committed by Iuri Matias
parent 63ce87d5e9
commit 37649a5d86
1 changed files with 35 additions and 31 deletions

View File

@ -6,7 +6,7 @@ import Qt.labs.platform 1.1
import "../../imports" import "../../imports"
import "../../shared" import "../../shared"
SplitView { Item {
id: walletView id: walletView
x: 0 x: 0
y: 0 y: 0
@ -19,8 +19,10 @@ SplitView {
anchors.leftMargin: 0 anchors.leftMargin: 0
ColumnLayout { ColumnLayout {
readonly property int w: 340
id: walletInfoContainer id: walletInfoContainer
width: 340 width: w
spacing: 0 spacing: 0
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 0 anchors.leftMargin: 0
@ -31,15 +33,14 @@ SplitView {
RowLayout { RowLayout {
id: walletHeader id: walletHeader
height: 300 height: 375
Layout.fillWidth: true Layout.fillWidth: true
width: walletInfoContainer.w
Rectangle { Rectangle {
id: walletHeaderContent id: walletHeaderContent
width: 200
height: 200
color: Theme.blue color: Theme.blue
Layout.fillHeight: true height: 375
Layout.fillWidth: true Layout.fillWidth: true
Item { Item {
@ -84,33 +85,29 @@ SplitView {
} }
TabBar { TabBar {
readonly property int btnHeight: 56
id: walletScreenButtons id: walletScreenButtons
anchors.right: parent.right width: walletInfoContainer.w
anchors.rightMargin: 0 height: btnHeight*3
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: 0 anchors.bottomMargin: 0
currentIndex: 0 currentIndex: 0
spacing: 0
background: Rectangle { background: Rectangle {
color: "#00000000" color: "#00000000"
} }
TabButton { TabButton {
id: sendTabButton id: sendTabButton
height: 56 width: walletInfoContainer.w
height: walletScreenButtons.btnHeight
text: "" text: ""
anchors.bottom: depositTabButton.top anchors.top: parent.top
Layout.fillWidth: true anchors.topMargin: 0
anchors.bottomMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
background: Rectangle { background: Rectangle {
color: parent.checked ? Theme.darkBlue : Theme.transparent color: parent.checked ? Theme.darkBlue : Theme.transparent
} }
Text { Text {
id: element id: element
color: "#ffffff" color: "#ffffff"
@ -132,16 +129,16 @@ SplitView {
bg: "#19ffffff" bg: "#19ffffff"
} }
} }
TabButton { TabButton {
id: depositTabButton id: depositTabButton
height: 56 width: walletInfoContainer.w
height: walletScreenButtons.btnHeight
text: "" text: ""
anchors.bottom: txHistoryTabButton.top
anchors.bottomMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.topMargin: 0
anchors.top: sendTabButton.bottom
background: Rectangle { background: Rectangle {
color: parent.checked ? Theme.darkBlue : Theme.transparent color: parent.checked ? Theme.darkBlue : Theme.transparent
} }
@ -167,20 +164,19 @@ SplitView {
bg: "#19ffffff" bg: "#19ffffff"
} }
} }
TabButton { TabButton {
id: txHistoryTabButton id: txHistoryTabButton
height: 56 width: walletInfoContainer.w
height: walletScreenButtons.btnHeight
text: "" text: ""
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 0 anchors.leftMargin: 0
anchors.topMargin: 0
anchors.top: depositTabButton.bottom
background: Rectangle { background: Rectangle {
color: parent.checked ? Theme.darkBlue : Theme.transparent color: parent.checked ? Theme.darkBlue : Theme.transparent
} }
Text { Text {
id: element3 id: element3
color: "#ffffff" color: "#ffffff"
@ -307,6 +303,14 @@ SplitView {
StackLayout { StackLayout {
id: walletContainer id: walletContainer
anchors.top: parent.top
anchors.topMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: walletInfoContainer.right
anchors.leftMargin: 0
currentIndex: walletScreenButtons.currentIndex currentIndex: walletScreenButtons.currentIndex
Item { Item {
@ -368,6 +372,6 @@ SplitView {
} }
/*##^## /*##^##
Designer { Designer {
D{i:0;autoSize:true;height:770;width:1152}D{i:4;anchors_x:140;anchors_y:93}D{i:8;anchors_width:240} D{i:0;autoSize:true;formeditorZoom:0.75;height:770;width:1152}D{i:10;anchors_width:340}
} }
##^##*/ ##^##*/