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:
parent
f88a05e2f5
commit
0b8a6ae511
|
@ -79,7 +79,7 @@ Item {
|
||||||
|
|
||||||
id: rectangle
|
id: rectangle
|
||||||
height: 64
|
height: 64
|
||||||
color: selected ? Style.current.blue : Style.current.transparent
|
color: selected ? iconColor : Style.current.transparent
|
||||||
radius: Style.current.radius
|
radius: Style.current.radius
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Style.current.padding
|
anchors.rightMargin: Style.current.padding
|
||||||
|
|
|
@ -35,7 +35,7 @@ Item {
|
||||||
id: separatorDot
|
id: separatorDot
|
||||||
width: 8
|
width: 8
|
||||||
height: 8
|
height: 8
|
||||||
color: Style.current.blue
|
color: currentAccount.iconColor
|
||||||
anchors.top: title.verticalCenter
|
anchors.top: title.verticalCenter
|
||||||
anchors.topMargin: -3
|
anchors.topMargin: -3
|
||||||
anchors.left: title.right
|
anchors.left: title.right
|
||||||
|
|
|
@ -75,11 +75,13 @@ SplitView {
|
||||||
|
|
||||||
StatusTabButton {
|
StatusTabButton {
|
||||||
id: assetBtn
|
id: assetBtn
|
||||||
|
tabColor: walletModel.currentAccount.iconColor
|
||||||
//% "Assets"
|
//% "Assets"
|
||||||
btnText: qsTrId("wallet-assets")
|
btnText: qsTrId("wallet-assets")
|
||||||
}
|
}
|
||||||
StatusTabButton {
|
StatusTabButton {
|
||||||
id: collectiblesBtn
|
id: collectiblesBtn
|
||||||
|
tabColor: walletModel.currentAccount.iconColor
|
||||||
anchors.left: assetBtn.right
|
anchors.left: assetBtn.right
|
||||||
anchors.leftMargin: 32
|
anchors.leftMargin: 32
|
||||||
//% "Collectibles"
|
//% "Collectibles"
|
||||||
|
@ -87,6 +89,7 @@ SplitView {
|
||||||
}
|
}
|
||||||
StatusTabButton {
|
StatusTabButton {
|
||||||
id: historyBtn
|
id: historyBtn
|
||||||
|
tabColor: walletModel.currentAccount.iconColor
|
||||||
anchors.left: collectiblesBtn.right
|
anchors.left: collectiblesBtn.right
|
||||||
anchors.leftMargin: 32
|
anchors.leftMargin: 32
|
||||||
//% "History"
|
//% "History"
|
||||||
|
|
|
@ -49,6 +49,7 @@ ModalPopup {
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
passwordInput.text = ""
|
passwordInput.text = ""
|
||||||
|
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
|
||||||
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +89,6 @@ ModalPopup {
|
||||||
|
|
||||||
ColorSelector {
|
ColorSelector {
|
||||||
id: accountColorInput
|
id: accountColorInput
|
||||||
selectedColor: Constants.accountColors[0]
|
|
||||||
model: Constants.accountColors
|
model: Constants.accountColors
|
||||||
anchors.top: accountNameInput.bottom
|
anchors.top: accountNameInput.bottom
|
||||||
anchors.topMargin: marginBetweenInputs
|
anchors.topMargin: marginBetweenInputs
|
||||||
|
|
|
@ -52,7 +52,10 @@ ModalPopup {
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
passwordInput.text = ""
|
accountSeedInput.text = "";
|
||||||
|
passwordInput.text = "";
|
||||||
|
accountNameInput.text = "";
|
||||||
|
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
|
||||||
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +104,6 @@ ModalPopup {
|
||||||
|
|
||||||
ColorSelector {
|
ColorSelector {
|
||||||
id: accountColorInput
|
id: accountColorInput
|
||||||
selectedColor: Constants.accountColors[0]
|
|
||||||
model: Constants.accountColors
|
model: Constants.accountColors
|
||||||
anchors.top: accountNameInput.bottom
|
anchors.top: accountNameInput.bottom
|
||||||
anchors.topMargin: marginBetweenInputs
|
anchors.topMargin: marginBetweenInputs
|
||||||
|
|
|
@ -37,6 +37,8 @@ ModalPopup {
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
addressInput.text = "";
|
addressInput.text = "";
|
||||||
|
accountNameInput.text = "";
|
||||||
|
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
|
||||||
addressInput.forceActiveFocus(Qt.MouseFocusReason)
|
addressInput.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +65,6 @@ ModalPopup {
|
||||||
|
|
||||||
ColorSelector {
|
ColorSelector {
|
||||||
id: accountColorInput
|
id: accountColorInput
|
||||||
selectedColor: Constants.accountColors[0]
|
|
||||||
model: Constants.accountColors
|
model: Constants.accountColors
|
||||||
anchors.top: accountNameInput.bottom
|
anchors.top: accountNameInput.bottom
|
||||||
anchors.topMargin: marginBetweenInputs
|
anchors.topMargin: marginBetweenInputs
|
||||||
|
|
|
@ -37,6 +37,8 @@ ModalPopup {
|
||||||
|
|
||||||
onOpened: {
|
onOpened: {
|
||||||
passwordInput.text = "";
|
passwordInput.text = "";
|
||||||
|
accountNameInput.text = "";
|
||||||
|
accountColorInput.selectedColor = Constants.accountColors[Math.floor(Math.random() * Constants.accountColors.length)]
|
||||||
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
passwordInput.forceActiveFocus(Qt.MouseFocusReason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +65,6 @@ ModalPopup {
|
||||||
|
|
||||||
ColorSelector {
|
ColorSelector {
|
||||||
id: accountColorInput
|
id: accountColorInput
|
||||||
selectedColor: Constants.accountColors[0]
|
|
||||||
model: Constants.accountColors
|
model: Constants.accountColors
|
||||||
anchors.top: accountNameInput.bottom
|
anchors.top: accountNameInput.bottom
|
||||||
anchors.topMargin: marginBetweenInputs
|
anchors.topMargin: marginBetweenInputs
|
||||||
|
|
|
@ -4,6 +4,8 @@ import "../imports"
|
||||||
|
|
||||||
TabButton {
|
TabButton {
|
||||||
property string btnText: "Default Button"
|
property string btnText: "Default Button"
|
||||||
|
property string tabColor: Style.current.blue
|
||||||
|
|
||||||
|
|
||||||
id: tabButton
|
id: tabButton
|
||||||
width: tabBtnText.width
|
width: tabBtnText.width
|
||||||
|
@ -25,7 +27,7 @@ TabButton {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: parent.checked
|
visible: parent.checked
|
||||||
color: Style.current.blue
|
color: tabColor
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 0
|
anchors.bottomMargin: 0
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
Loading…
Reference in New Issue