fix(gtk): correct leaflet API usage

This commit is contained in:
Johannes Frohnmeyer 2024-06-22 20:59:53 +02:00
parent b6ef0da344
commit 356f80d25c
Signed by: Johannes
GPG Key ID: E76429612C2929F4

View File

@ -35,7 +35,10 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
private val instance: Instance = window.instance
private val mds: ModsDirScanner = instance.mds
private val listModel: StringList
private val loadingRevealer = LoadingRevealer()
private val loadingRevealer = LoadingRevealer().apply {
halign = Align.CENTER
valign = Align.START
}
private val descriptionLabel: ILabel
private var page: Page = Page.LOCAL
@ -49,8 +52,9 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
homogeneous = false
canNavigateBack = true
transitionType = LeafletTransitionType.OVER
var vsblChld: Box?
append(Box(Orientation.VERTICAL, 6).apply {
content.visibleChild = this
vsblChld = this
append(KDropDown("instance.settings.mods.local", "instance.settings.mods.modrinth", "instance.settings.mods.curseforge").apply {
onChange { newFilter ->
when (newFilter) {
@ -76,6 +80,7 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
addOverlay(loadingRevealer)
})
})
visibleChild = vsblChld!!
append(Separator(Orientation.VERTICAL)).navigatable = false
append(Box(Orientation.VERTICAL, 6).apply {
descriptionLabel = ILabel("instance.settings.mods.select")