fix: proper handling of test network icon

This commit is contained in:
Dario Gabriel Lipicar 2025-02-06 10:34:23 -03:00
parent fbcf9cc89a
commit 8f38e10d0a
No known key found for this signature in database
GPG Key ID: 9625E9494309D203
3 changed files with 4 additions and 27 deletions

View File

@ -83,7 +83,7 @@ Item {
verify(!!delegate) verify(!!delegate)
compare(delegate.title, model.chainName) compare(delegate.title, model.chainName)
compare(delegate.iconUrl, (model.isTest ? Theme.svg(model.iconUrl + "-test") : Theme.svg(model.iconUrl))) compare(delegate.iconUrl, Theme.svg(model.iconUrl))
compare(delegate.showIndicator, controlUnderTest.showIndicator) compare(delegate.showIndicator, controlUnderTest.showIndicator)
compare(delegate.multiSelection, controlUnderTest.multiSelection) compare(delegate.multiSelection, controlUnderTest.multiSelection)
compare(delegate.checkState, controlUnderTest.selection.includes(model.chainId) ? Qt.Checked : Qt.Unchecked) compare(delegate.checkState, controlUnderTest.selection.includes(model.chainId) ? Qt.Checked : Qt.Unchecked)

View File

@ -101,7 +101,7 @@ StatusComboBox {
width: 24 width: 24
height: 24 height: 24
image.source: model.isTest ? Theme.svg(model.iconUrl + "-test") : Theme.svg(model.iconUrl) image.source: Theme.svg(model.iconUrl)
z: index + 1 z: index + 1
image.layer.enabled: index < chainRepeater.count - 1 && row.spacing < 0 image.layer.enabled: index < chainRepeater.count - 1 && row.spacing < 0
@ -186,9 +186,7 @@ StatusComboBox {
value: root.selection[0] ?? -1 value: root.selection[0] ?? -1
} }
readonly property string singleSelectionIconUrl: singleSelectionItem.item.iconUrl ? (singleSelectionItem.item.isTest ? singleSelectionItem.item.iconUrl + "-test" readonly property string singleSelectionIconUrl: singleSelectionItem.item.iconUrl ?? ""
: singleSelectionItem.item.iconUrl)
: ""
readonly property string singleCelectionChainName: singleSelectionItem.item.chainName ?? "" readonly property string singleCelectionChainName: singleSelectionItem.item.chainName ?? ""
readonly property string titleText: { readonly property string titleText: {

View File

@ -74,7 +74,7 @@ StatusListView {
height: 48 height: 48
width: ListView.view.width width: ListView.view.width
title: model.chainName title: model.chainName
iconUrl: model.isTest ? Theme.svg(model.iconUrl + "-test") : Theme.svg(model.iconUrl) iconUrl: Theme.svg(model.iconUrl)
showIndicator: root.showIndicator showIndicator: root.showIndicator
multiSelection: root.multiSelection multiSelection: root.multiSelection
interactive: root.interactive interactive: root.interactive
@ -97,27 +97,6 @@ StatusListView {
} }
} }
section {
property: "layer"
delegate: Loader {
required property int section
width: parent.width
height: active ? 44 : 0
active: section === 2
sourceComponent: layer2text
Component {
id: layer2text
StatusBaseText {
color: Theme.palette.baseColor1
text: qsTr("Layer 2")
leftPadding: 16
topPadding: 14
}
}
}
}
QtObject { QtObject {
id: d id: d
readonly property bool allSelected: root.selection.length === root.count readonly property bool allSelected: root.selection.length === root.count