ui/history_view: size Log column to content so file names aren't truncated
The Log column was fixed at 240px with TextTruncate, clipping log file names like 20260601-100000_<JobName>.log. Measure the widest value and size the column to fit (bounded 240–520px), recomputing on refresh so newly recorded events widen the column instead of being cut off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ func newMainView(w fyne.Window) (fyne.CanvasObject, func(time.Duration, bool)) {
|
||||
|
||||
jobsPanel, refreshJobsView := newJobsView(w, svc)
|
||||
|
||||
history := newHistoryView(&events)
|
||||
history, refreshHistory := newHistoryView(&events)
|
||||
recordStartup := func(duration time.Duration, windowShown bool) {
|
||||
// Startup is recorded as an in-memory History event instead of being
|
||||
// persisted into jobs.yaml. It is session diagnostics, not durable job
|
||||
@@ -51,12 +51,12 @@ func newMainView(w fyne.Window) (fyne.CanvasObject, func(time.Duration, bool)) {
|
||||
detail = "Started in tray in " + duration.Round(time.Millisecond).String()
|
||||
}
|
||||
events = append(events, newEvent(0, "Application", "Started", detail))
|
||||
history.Refresh()
|
||||
refreshHistory()
|
||||
}
|
||||
|
||||
refresh := func() {
|
||||
refreshJobsView()
|
||||
history.Refresh()
|
||||
refreshHistory()
|
||||
}
|
||||
|
||||
// The Service announces every change through events. This single listener is
|
||||
|
||||
Reference in New Issue
Block a user