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