Various ui fixes on wallet

-  Account color is used in list hightlight, separator and tabs
- Popup fields are cleared when opened
- Account color is randomized when popup is opened
This commit is contained in:
Richard Ramos 2020-11-27 11:13:35 -04:00 committed by Iuri Matias
parent f88a05e2f5
commit 0b8a6ae511
8 changed files with 17 additions and 8 deletions

View File

@ -79,7 +79,7 @@ Item {
id: rectangle
height: 64
color: selected ? Style.current.blue : Style.current.transparent
color: selected ? iconColor : Style.current.transparent
radius: Style.current.radius
anchors.right: parent.right
anchors.rightMargin: Style.current.padding

View File

@ -35,7 +35,7 @@ Item {
id: separatorDot
width: 8
height: 8
color: Style.current.blue
color: currentAccount.iconColor
anchors.top: title.verticalCenter
anchors.topMargin: -3
anchors.left: title.right

View File

@ -75,11 +75,13 @@ SplitView {
StatusTabButton {
id: assetBtn
tabColor: walletModel.currentAccount.iconColor
//% "Assets"
btnText: qsTrId("wallet-assets")
}
StatusTabButton {
id: collectiblesBtn
tabColor: walletModel.currentAccount.iconColor
anchors.left: assetBtn.right
anchors.leftMargin: 32
//% "Collectibles"
@ -87,6 +89,7 @@ SplitView {
}
StatusTabButton {
id: historyBtn
tabColor: walletModel.currentAccount.iconColor
anchors.left: collectiblesBtn.right
anchors.leftMargin: 32
//% "History"

View File

@ -49,6 +49,7 @@ ModalPopup {
onOpened: {
passwordInput.text = ""
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
}
@ -88,7 +89,6 @@ ModalPopup {
ColorSelector {
id: accountColorInput
selectedColor: Constants.accountColors[0]
model: Constants.accountColors
anchors.top: accountNameInput.bottom
anchors.topMargin: marginBetweenInputs

View File

@ -52,7 +52,10 @@ ModalPopup {
}
onOpened: {
passwordInput.text = ""
accountSeedInput.text = "";
passwordInput.text = "";
accountNameInput.text = "";
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
}
@ -101,7 +104,6 @@ ModalPopup {
ColorSelector {
id: accountColorInput
selectedColor: Constants.accountColors[0]
model: Constants.accountColors
anchors.top: accountNameInput.bottom
anchors.topMargin: marginBetweenInputs

View File

@ -37,6 +37,8 @@ ModalPopup {
onOpened: {
addressInput.text = "";
accountNameInput.text = "";
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
addressInput.forceActiveFocus(Qt.MouseFocusReason)
}
@ -63,7 +65,6 @@ ModalPopup {
ColorSelector {
id: accountColorInput
selectedColor: Constants.accountColors[0]
model: Constants.accountColors
anchors.top: accountNameInput.bottom
anchors.topMargin: marginBetweenInputs

View File

@ -37,6 +37,8 @@ ModalPopup {
onOpened: {
passwordInput.text = "";
accountNameInput.text = "";
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
}
@ -63,7 +65,6 @@ ModalPopup {
ColorSelector {
id: accountColorInput
selectedColor: Constants.accountColors[0]
model: Constants.accountColors
anchors.top: accountNameInput.bottom
anchors.topMargin: marginBetweenInputs

View File

@ -4,6 +4,8 @@ import "../imports"
TabButton {
property string btnText: "Default Button"
property string tabColor: Style.current.blue
id: tabButton
width: tabBtnText.width
@ -25,7 +27,7 @@ TabButton {
Rectangle {
visible: parent.checked
color: Style.current.blue
color: tabColor
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.right: parent.right