Skip to content

Launcher: long Game location path overflows the window — enable word wrapping #26

Description

@swstegall

Summary

In the launcher's main window, the Game location: path is drawn on a single non-wrapping line. A long install path (e.g. /Users/swstegall/Documents/Programming/server-workspace/ffxiv-install-environment/…) runs off the right edge of the window and is clipped, so the end of the path (the part that actually disambiguates the install) is unreadable. The path should word-wrap within the window width instead.

Observed: the "Game location:" row shows …/ffxiv-install-environment/t and is cut off at the window's right border, with the remainder of the path inaccessible without resizing the window very wide.

Root cause

src/app/launcher_window.rs:418-425 renders the path with ui.monospace(...) inside a plain ui.horizontal(...):

ui.horizontal(|ui| {
    ui.label("Game location:");
    let shown = self
        .resolved_game_location()
        .map(|p| p.display().to_string())
        .unwrap_or_else(|| "(not set)".to_string());
    ui.monospace(shown);            // <- single line, no wrap, unbounded width
});

A plain ui.horizontal lays its children out left-to-right with effectively unbounded width, and ui.monospace defaults to TextWrapMode::Extend — so a long path just keeps extending past the panel/window edge instead of wrapping. (Same would apply to any long path; the screenshot path is ~95 chars.)

Suggested fix (egui 0.28)

The label needs a bounded width + wrapping. Options, in rough order of preference:

  1. Wrap within the row — use horizontal_wrapped, which constrains to the available panel width and wraps children onto new rows:

    ui.horizontal_wrapped(|ui| {
        ui.label("Game location:");
        ui.monospace(shown);
    });
  2. Path on its own line, wrapped — a Label that is not inside a horizontal layout grows to the panel width and wraps:

    ui.label("Game location:");
    ui.add(egui::Label::new(egui::RichText::new(shown).monospace()).wrap());
  3. Truncate with ellipsis + full path on hover (if a one-line row is preferred over wrapping) — keeps the row height fixed and never overflows:

    ui.add(egui::Label::new(egui::RichText::new(shown).monospace()).truncate())
        .on_hover_text(&full_path);

The user request is specifically word wrapping, so prefer (1) or (2); (3) is the alternative if wrapping a long path across several rows is considered too tall.

While here, sanity-check the sibling rows in the same panel (e.g. the game.ver … status colored_label at launcher_window.rs:439) don't have the same overflow with long content.

Acceptance criteria

  • A long Game location path wraps (or truncates with a full-path tooltip) so it stays within the launcher window and nothing is clipped off the right edge.
  • The window remains usable at its default size — the long path no longer forces horizontal overflow.
  • Short paths and the (not set) placeholder still render correctly on one line.

Pointers

  • src/app/launcher_window.rs:418-425 — the "Game location:" row (the fix site)
  • src/app/launcher_window.rs:439 — adjacent game.ver status label (verify no similar overflow)
  • egui 0.28 wrapping APIs: Ui::horizontal_wrapped, egui::Label::wrap() / ::truncate(), Response::on_hover_text

Metadata

Metadata

Assignees

No one assigned

    Labels

    Garlemald ClientFor work units related to Garlemald Client.bugSomething isn't workinggood first issueGood for newcomers

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions