feat(ui): two-column settings/details, compact job list, manual run while paused

- Allow manual "Run now" while the scheduler is paused: pause now stops only
  automatic scheduled runs (RunDue), not the user's explicit action. Drop the
  paused guard in Service.RunNow and the UI pause dialog; update tests.
- Cap the details metadata caption width via a new captionValueLayout so a wider
  window feeds extra space to the value column instead of the short caption.
- Reorganize the Settings tab into two columns (Application+Queue / Storage+About)
  with Save spanning the full width; move the Autostart status onto its own line.
- Condense the Jobs list rows with compactVBoxLayout to fit more jobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-25 07:51:03 +03:00
parent 43809e5076
commit 9ecb8b61f8
6 changed files with 146 additions and 58 deletions
+43
View File
@@ -2,6 +2,7 @@ package ui
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
type minWidthLayout struct {
@@ -107,3 +108,45 @@ func (l fixedHeightLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {
object.Resize(fyne.NewSize(size.Width, l.height))
}
}
// captionValueLayout places a fixed-width caption on the left and lets the value
// fill the remaining width, separated by one theme padding. Capping the caption
// stops it from growing with the window (as an even two-column grid would), so
// the extra space a wider window provides goes entirely to the value column. It
// expects exactly two children: caption first, value second.
type captionValueLayout struct {
captionWidth float32
}
func (l captionValueLayout) MinSize(objects []fyne.CanvasObject) fyne.Size {
if len(objects) != 2 {
return fyne.Size{}
}
captionMin, valueMin := objects[0].MinSize(), objects[1].MinSize()
height := captionMin.Height
if valueMin.Height > height {
height = valueMin.Height
}
return fyne.NewSize(l.captionWidth+theme.Padding()+valueMin.Width, height)
}
func (l captionValueLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {
if len(objects) != 2 {
return
}
caption, value := objects[0], objects[1]
captionWidth := l.captionWidth
if captionWidth > size.Width {
captionWidth = size.Width
}
caption.Move(fyne.NewPos(0, 0))
caption.Resize(fyne.NewSize(captionWidth, size.Height))
valueX := captionWidth + theme.Padding()
valueWidth := size.Width - valueX
if valueWidth < 0 {
valueWidth = 0
}
value.Move(fyne.NewPos(valueX, 0))
value.Resize(fyne.NewSize(valueWidth, size.Height))
}