fix(gtk): correct leaflet API usage
This commit is contained in:
parent
b6ef0da344
commit
356f80d25c
@ -35,7 +35,10 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
|
|||||||
private val instance: Instance = window.instance
|
private val instance: Instance = window.instance
|
||||||
private val mds: ModsDirScanner = instance.mds
|
private val mds: ModsDirScanner = instance.mds
|
||||||
private val listModel: StringList
|
private val listModel: StringList
|
||||||
private val loadingRevealer = LoadingRevealer()
|
private val loadingRevealer = LoadingRevealer().apply {
|
||||||
|
halign = Align.CENTER
|
||||||
|
valign = Align.START
|
||||||
|
}
|
||||||
private val descriptionLabel: ILabel
|
private val descriptionLabel: ILabel
|
||||||
|
|
||||||
private var page: Page = Page.LOCAL
|
private var page: Page = Page.LOCAL
|
||||||
@ -49,8 +52,9 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
|
|||||||
homogeneous = false
|
homogeneous = false
|
||||||
canNavigateBack = true
|
canNavigateBack = true
|
||||||
transitionType = LeafletTransitionType.OVER
|
transitionType = LeafletTransitionType.OVER
|
||||||
|
var vsblChld: Box?
|
||||||
append(Box(Orientation.VERTICAL, 6).apply {
|
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 {
|
append(KDropDown("instance.settings.mods.local", "instance.settings.mods.modrinth", "instance.settings.mods.curseforge").apply {
|
||||||
onChange { newFilter ->
|
onChange { newFilter ->
|
||||||
when (newFilter) {
|
when (newFilter) {
|
||||||
@ -76,6 +80,7 @@ class ModsTab(window: InstanceSettingsWindow) : SettingsTab<Leaflet, InstanceSet
|
|||||||
addOverlay(loadingRevealer)
|
addOverlay(loadingRevealer)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
visibleChild = vsblChld!!
|
||||||
append(Separator(Orientation.VERTICAL)).navigatable = false
|
append(Separator(Orientation.VERTICAL)).navigatable = false
|
||||||
append(Box(Orientation.VERTICAL, 6).apply {
|
append(Box(Orientation.VERTICAL, 6).apply {
|
||||||
descriptionLabel = ILabel("instance.settings.mods.select")
|
descriptionLabel = ILabel("instance.settings.mods.select")
|
||||||
|
Loading…
Reference in New Issue
Block a user