feat: put the Folder caption on the filter row

The caption sat on its own line above the select, costing the sidebar a full
label of height before the job list started. It now occupies the border
layout's left slot, next to the select and the view toggle, so the whole filter
is one row and the list begins a line higher.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-07-26 22:51:48 +03:00
parent 4d014e2f45
commit 7aa1421639
+6 -5
View File
@@ -354,11 +354,12 @@ func newJobsView(w fyne.Window, svc *app.Service) (fyne.CanvasObject, func()) {
toolbar := container.NewHBox(addButton, editButton, runButton, pauseButton, deleteButton, layout.NewSpacer()) toolbar := container.NewHBox(addButton, editButton, runButton, pauseButton, deleteButton, layout.NewSpacer())
globalControls := container.NewHBox(stopAllButton, schedulerState, layout.NewSpacer()) globalControls := container.NewHBox(stopAllButton, schedulerState, layout.NewSpacer())
// The view toggle sits beside the folder filter: the border layout gives it // The whole filter is one row: caption on the left, view toggle on the right,
// its MinSize on the right and lets the select fill the rest, so the header // select filling what is left. The border layout gives both edges their
// gains no height. // MinSize, so the header is a line shorter than a stacked caption would make it.
filterRow := container.NewBorder(nil, nil, nil, viewButton, folderSelect) folderCaption := widget.NewLabelWithStyle("Folder", fyne.TextAlignLeading, fyne.TextStyle{Bold: true})
sidebarHeader := container.NewVBox(globalControls, widget.NewSeparator(), widget.NewLabelWithStyle("Folder", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}), filterRow, toolbar) filterRow := container.NewBorder(nil, nil, folderCaption, viewButton, folderSelect)
sidebarHeader := container.NewVBox(globalControls, widget.NewSeparator(), filterRow, toolbar)
sidebar := container.NewBorder(sidebarHeader, nil, nil, nil, list) sidebar := container.NewBorder(sidebarHeader, nil, nil, nil, list)
fixedSidebar := container.New(minWidthLayout{width: minJobsSidebarWidth}, sidebar) fixedSidebar := container.New(minWidthLayout{width: minJobsSidebarWidth}, sidebar)