fix: Minors fixes for issues found when using StatusFloatingButtons and implementing new SendModal (#748)
1. Fix the issue of floating buttons having incorrect color in Dark theme 2. Added balances param in StatusAssetSelector. ideally should be removed in another task as it is not the correct place for business logic
This commit is contained in:
parent
e2d42289f7
commit
c697467c68
|
@ -419,6 +419,7 @@ CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2I
|
|||
height: button.height
|
||||
radius: 8
|
||||
visible: visibleIndices.includes(index)
|
||||
color: Theme.palette.statusAppLayout.backgroundColor
|
||||
StatusButton {
|
||||
id: button
|
||||
topPadding: 8
|
||||
|
|
|
@ -13,6 +13,7 @@ Item {
|
|||
property var assets
|
||||
property var selectedAsset
|
||||
property string defaultToken: ""
|
||||
property string userSelectedToken: ""
|
||||
property var tokenAssetSourceFn: function (symbol) {
|
||||
return ""
|
||||
}
|
||||
|
@ -128,16 +129,25 @@ Item {
|
|||
background: Rectangle {
|
||||
color: itemContainer.highlighted ? Theme.palette.statusSelect.menuItemHoverBackgroundColor : Theme.palette.statusSelect.menuItemBackgroundColor
|
||||
}
|
||||
// To-do move this out of StatusQ, this involves dependency on BE code
|
||||
Component.onCompleted: {
|
||||
if(index === 0 ) {
|
||||
selectedAsset = { name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance}
|
||||
if(userSelectedToken === "") {
|
||||
if(index === 0) {
|
||||
selectedAsset = { name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance, balances: balances}
|
||||
}
|
||||
} else {
|
||||
if(symbol === userSelectedToken) {
|
||||
selectedAsset = { name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance, balances: balances}
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: itemContainer
|
||||
onClicked: {
|
||||
selectedAsset = {name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance}
|
||||
userSelectedToken = symbol
|
||||
// To-do move this out of StatusQ, this involves dependency on BE code
|
||||
selectedAsset = {name: name, symbol: symbol, totalBalance: totalBalance, totalCurrencyBalance: totalCurrencyBalance, balances: balances}
|
||||
select.selectMenu.close()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ Row {
|
|||
height: button.height
|
||||
radius: 8
|
||||
visible: floatingButtons.model.count > 3
|
||||
color: Theme.palette.statusAppLayout.backgroundColor
|
||||
StatusButton {
|
||||
id: button
|
||||
implicitHeight: 32
|
||||
|
|
Loading…
Reference in New Issue