fix(warnings): Fixed qml warnings

Fixed qml warnings
This commit is contained in:
Noelia 2023-06-09 11:54:47 +02:00 committed by Noelia
parent f227a92cf1
commit 02baf36070
2 changed files with 33 additions and 30 deletions

View File

@ -31,7 +31,8 @@ StatusComboBox {
property string selectedChainName: ""
property string selectedIconUrl: ""
readonly property bool allSelected: root.enabledNetworks.count === root.allNetworks.count
readonly property bool allSelected: (!!root.enabledNetworks && !!root.allNetworks) ? root.enabledNetworks.count === root.allNetworks.count :
false
// Persist selection between selectPopupLoader reloads
property var currentModel: layer1Networks

View File

@ -765,35 +765,37 @@ QtObject {
}
function getColorForId(colorId) {
switch(colorId.toUpperCase()) {
case Constants.walletAccountColors.primary.toUpperCase():
return Theme.palette.customisationColors.blue
case Constants.walletAccountColors.purple.toUpperCase():
return Theme.palette.customisationColors.purple
case Constants.walletAccountColors.orange.toUpperCase():
return Theme.palette.customisationColors.orange
case Constants.walletAccountColors.army.toUpperCase():
return Theme.palette.customisationColors.army
case Constants.walletAccountColors.turquoise.toUpperCase():
return Theme.palette.customisationColors.turquoise
case Constants.walletAccountColors.sky.toUpperCase():
return Theme.palette.customisationColors.sky
case Constants.walletAccountColors.yellow.toUpperCase():
return Theme.palette.customisationColors.yellow
case Constants.walletAccountColors.pink.toUpperCase():
return Theme.palette.customisationColors.pink
case Constants.walletAccountColors.copper.toUpperCase():
return Theme.palette.customisationColors.copper
case Constants.walletAccountColors.camel.toUpperCase():
return Theme.palette.customisationColors.camel
case Constants.walletAccountColors.magenta.toUpperCase():
return Theme.palette.customisationColors.magenta
case Constants.walletAccountColors.yinYang.toUpperCase():
return Theme.palette.customisationColors.yinYang
case Constants.walletAccountColors.undefinedAccount.toUpperCase():
return Theme.palette.baseColor1
default:
return Theme.palette.customisationColors.blue
if(colorId) {
switch(colorId.toUpperCase()) {
case Constants.walletAccountColors.primary.toUpperCase():
return Theme.palette.customisationColors.blue
case Constants.walletAccountColors.purple.toUpperCase():
return Theme.palette.customisationColors.purple
case Constants.walletAccountColors.orange.toUpperCase():
return Theme.palette.customisationColors.orange
case Constants.walletAccountColors.army.toUpperCase():
return Theme.palette.customisationColors.army
case Constants.walletAccountColors.turquoise.toUpperCase():
return Theme.palette.customisationColors.turquoise
case Constants.walletAccountColors.sky.toUpperCase():
return Theme.palette.customisationColors.sky
case Constants.walletAccountColors.yellow.toUpperCase():
return Theme.palette.customisationColors.yellow
case Constants.walletAccountColors.pink.toUpperCase():
return Theme.palette.customisationColors.pink
case Constants.walletAccountColors.copper.toUpperCase():
return Theme.palette.customisationColors.copper
case Constants.walletAccountColors.camel.toUpperCase():
return Theme.palette.customisationColors.camel
case Constants.walletAccountColors.magenta.toUpperCase():
return Theme.palette.customisationColors.magenta
case Constants.walletAccountColors.yinYang.toUpperCase():
return Theme.palette.customisationColors.yinYang
case Constants.walletAccountColors.undefinedAccount.toUpperCase():
return Theme.palette.baseColor1
default:
return Theme.palette.customisationColors.blue
}
}
}