фикс окна конфигураций (vibe-kanban 3fe07924)

в окне конфигураций есть баг с отображением списка конфигураций - этот скроллвью сжат по высоте (он приклеился к верху и отображается не во всё пространство окна).
This commit is contained in:
Vibe Kanban
2026-01-16 18:59:58 +03:00
parent a58413d778
commit 5b0affda59
2 changed files with 9 additions and 19 deletions

28
main.go
View File

@@ -264,15 +264,17 @@ func main() {
)
},
func(id widget.ListItemID, obj fyne.CanvasObject) {
box := obj.(*fyne.Container)
titleLabel := box.Objects[1].(*widget.Label)
buttonsContainer := box.Objects[2].(*fyne.Container)
containerObj := obj.(*fyne.Container)
// For a container.NewBorder(nil, nil, left, right, nil), the structure is:
// Objects[0] is the left element (label)
// Objects[1] is the right element (buttons container)
titleLabel := containerObj.Objects[0].(*widget.Label)
buttonsContainer := containerObj.Objects[1].(*fyne.Container)
editButton := buttonsContainer.Objects[0].(*widget.Button)
deleteButton := buttonsContainer.Objects[1].(*widget.Button)
titleLabel.SetText(configs[id].Title)
// Update visual indication for active config
if id == activeConfig {
titleLabel.SetText(fmt.Sprintf("● %s", configs[id].Title))
@@ -300,15 +302,6 @@ func main() {
},
configWindow)
}
// Allow clicking on the whole row to select the config
selectButton := widget.NewButton("", func() {
activeConfig = id
dialog.ShowInformation("Config Selected", fmt.Sprintf("Active config: %s", configs[id].Title), configWindow)
configWindow.Close()
})
selectButton.Hidden = true
box.Objects[0] = container.NewStack(selectButton)
},
)
@@ -337,11 +330,8 @@ func main() {
// Using container.NewBorder to make the entry expand properly
importContainer := container.NewBorder(nil, nil, nil, importButton, importEntry)
// Main content for the config window
configContent := container.NewVBox(
importContainer,
scrollContainer,
)
// Main content for the config window using a border container to properly size the scroll area
configContent := container.NewBorder(importContainer, nil, nil, nil, scrollContainer)
configWindow.SetContent(configContent)
configWindow.Show()