TokenSelectorPanel: tabs layout/sizing simplified
This commit is contained in:
parent
6a935d098c
commit
249e1ae042
|
@ -53,6 +53,8 @@ Control {
|
|||
contentItem: StackView {
|
||||
id: collectiblesStackView
|
||||
|
||||
implicitHeight: currentItem.implicitHeight
|
||||
|
||||
initialItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
|
|
|
@ -72,16 +72,13 @@ Control {
|
|||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
Layout.maximumHeight: 400
|
||||
|
||||
visible: !!root.assetsModel || !!root.collectiblesModel
|
||||
currentIndex: tabBar.currentIndex
|
||||
|
||||
SearchableAssetsPanel {
|
||||
id: searchableAssetsPanel
|
||||
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
visible: tabBar.currentIndex === TokenSelectorPanel.Tabs.Assets
|
||||
&& !!root.assetsModel
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
onSelected: root.assetSelected(key)
|
||||
}
|
||||
|
@ -89,11 +86,13 @@ Control {
|
|||
SearchableCollectiblesPanel {
|
||||
id: searchableCollectiblesPanel
|
||||
|
||||
Layout.preferredHeight: visible ? currentItem.implicitHeight : 0
|
||||
visible: tabBar.currentIndex === TokenSelectorPanel.Tabs.Collectibles
|
||||
&& !!root.collectiblesModel
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
onCollectibleSelected: root.collectibleSelected(key)
|
||||
onCollectionSelected: root.collectionSelected(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue