Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/launcher/internal/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,11 @@ func (l *Launcher) showDownloadProgress(version, title string) {
progressBar := widget.NewProgressBar()
progressBar.SetValue(0)

// Status label
// Status label. Truncate with an ellipsis so a long "Download failed:
// <url>" message can't stretch the window (and progress bar) to fit the
// whole error on one line; the full error is shown in the dialog below.
statusLabel := widget.NewLabel("Preparing download...")
statusLabel.Truncation = fyne.TextTruncateEllipsis

// Release notes button
releaseNotesButton := widget.NewButton("View Release Notes", func() {
Expand Down
5 changes: 4 additions & 1 deletion cmd/launcher/internal/systray_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,11 @@ func (sm *SystrayManager) showDownloadProgress(version string) {
progressBar := widget.NewProgressBar()
progressBar.SetValue(0)

// Status label
// Status label. Truncate with an ellipsis so a long "Download failed:
// <url>" message can't stretch the window (and progress bar) to fit the
// whole error on one line; the full error is shown in the dialog below.
statusLabel := widget.NewLabel("Preparing download...")
statusLabel.Truncation = fyne.TextTruncateEllipsis

// Release notes button
releaseNotesButton := widget.NewButton("View Release Notes", func() {
Expand Down
15 changes: 13 additions & 2 deletions cmd/launcher/internal/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ type LauncherUI struct {

// NewLauncherUI creates a new UI instance
func NewLauncherUI() *LauncherUI {
// Truncate the status text with an ellipsis. Status messages can carry a
// download error containing a long, unbreakable URL/path; without this the
// label demands the full single-line width and stretches the window (and
// the progress bar) arbitrarily wide. The full error is still shown in the
// error dialog.
statusLabel := widget.NewLabel("Initializing...")
statusLabel.Truncation = fyne.TextTruncateEllipsis

return &LauncherUI{
statusLabel: widget.NewLabel("Initializing..."),
statusLabel: statusLabel,
versionLabel: widget.NewLabel("Version: Unknown"),
startStopButton: widget.NewButton("Start LocalAI", nil),
webUIButton: widget.NewButton("Open WebUI", nil),
Expand Down Expand Up @@ -602,8 +610,11 @@ func (ui *LauncherUI) showDownloadProgress(version, title string) {
progressBar := widget.NewProgressBar()
progressBar.SetValue(0)

// Status label
// Status label. Truncate with an ellipsis so a long "Download failed:
// <url>" message can't stretch the window (and progress bar) to fit the
// whole error on one line; the full error is shown in the dialog below.
statusLabel := widget.NewLabel("Preparing download...")
statusLabel.Truncation = fyne.TextTruncateEllipsis

// Release notes button
releaseNotesButton := widget.NewButton("View Release Notes", func() {
Expand Down
Loading