refactor: truncate job names via the non-deprecated Truncation field

fyne.TextTruncate is deprecated in Fyne 2.7.4 in favour of the widget's
Truncation field. Behaviour is unchanged: a long job name is clipped rather
than widening the row, which is what keeps the compact row's status pinned to
the right-hand edge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-07-26 22:21:58 +03:00
parent bfb982cc27
commit 706aa8e6ba
+3 -2
View File
@@ -128,8 +128,9 @@ func newJobsView(w fyne.Window, svc *app.Service) (fyne.CanvasObject, func()) {
func() fyne.CanvasObject { func() fyne.CanvasObject {
name := widget.NewLabelWithStyle("Job name", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}) name := widget.NewLabelWithStyle("Job name", fyne.TextAlignLeading, fyne.TextStyle{Bold: true})
// Truncating stops a long name from pushing the compact row's status // Truncating stops a long name from pushing the compact row's status
// off the right-hand edge. // off the right-hand edge. Labels default to TextWrapOff, which grows
name.Wrapping = fyne.TextTruncate // the widget to fit instead.
name.Truncation = fyne.TextTruncateClip
inlineStatus := widget.NewLabel("status") inlineStatus := widget.NewLabel("status")
meta := widget.NewLabel("schedule") meta := widget.NewLabel("schedule")
status := widget.NewLabel("status") status := widget.NewLabel("status")