fix(ui): Prevent queue items from jumping during updates
- Changed text wrapping from TextWrapWord to TextTruncate on desc/status labels - Set fixed minimum height (140px) for job item cards - Prevents height fluctuations when status text changes - Resolves janky jumping behavior in job queue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e0fc69ab97
commit
4e8486a5da
|
|
@ -317,7 +317,7 @@ func buildJobItem(
|
||||||
|
|
||||||
descLabel := widget.NewLabel(descText)
|
descLabel := widget.NewLabel(descText)
|
||||||
descLabel.TextStyle = fyne.TextStyle{Italic: true}
|
descLabel.TextStyle = fyne.TextStyle{Italic: true}
|
||||||
descLabel.Wrapping = fyne.TextWrapWord
|
descLabel.Wrapping = fyne.TextTruncate
|
||||||
|
|
||||||
// Progress bar (for running jobs)
|
// Progress bar (for running jobs)
|
||||||
progress := NewStripedProgress(ModuleColor(job.Type))
|
progress := NewStripedProgress(ModuleColor(job.Type))
|
||||||
|
|
@ -343,7 +343,7 @@ func buildJobItem(
|
||||||
statusText := getStatusText(job, queuePositions)
|
statusText := getStatusText(job, queuePositions)
|
||||||
statusLabel := widget.NewLabel(statusText)
|
statusLabel := widget.NewLabel(statusText)
|
||||||
statusLabel.TextStyle = fyne.TextStyle{Monospace: true}
|
statusLabel.TextStyle = fyne.TextStyle{Monospace: true}
|
||||||
statusLabel.Wrapping = fyne.TextWrapWord
|
statusLabel.Wrapping = fyne.TextTruncate
|
||||||
|
|
||||||
// Control buttons
|
// Control buttons
|
||||||
var buttons []fyne.CanvasObject
|
var buttons []fyne.CanvasObject
|
||||||
|
|
@ -409,6 +409,7 @@ func buildJobItem(
|
||||||
// Card background
|
// Card background
|
||||||
card := canvas.NewRectangle(bgColor)
|
card := canvas.NewRectangle(bgColor)
|
||||||
card.CornerRadius = 4
|
card.CornerRadius = 4
|
||||||
|
card.SetMinSize(fyne.NewSize(0, 140)) // Fixed minimum height to prevent jumping
|
||||||
|
|
||||||
item := container.NewPadded(
|
item := container.NewPadded(
|
||||||
container.NewMax(card, content),
|
container.NewMax(card, content),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user