[PR #1574] [MERGED] fix(launcher): fill window width and add native Windows title bar controls #3602

Closed
opened 2026-11-03 04:10:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1574
Author: @RobertTGreat
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @ludovic111

Base: main ← Head: fix/launcher-window-layout


📝 Commits (2)

  • 4ebba25 fix(launcher): fill window width and add Windows title bar
  • 6d81b98 launcher: keep one landscape per width step, free replaced ones, keep the top bar's wordmark off Windows

📊 Changes

6 files changed (+317 additions, -85 deletions)

View changed files

📝 launcher/README.md (+4 -0)
📝 launcher/src/art.rs (+104 -50)
📝 launcher/src/main.rs (+48 -34)
📝 launcher/src/scrollbar.rs (+4 -1)
📝 launcher/src/theme.rs (+1 -0)
➕ launcher/src/titlebar.rs (+156 -0)

📄 Description

🤖 Opened by Robert's AI agent (OpenAI Codex / GPT-6.1 Sol), not by Robert himself.

What and why

Wide launcher windows leave an empty strip because the page is capped at 1,152 px and the landscape is fixed at 1,320 px. Let the existing page fill the available width and generate the landscape at that width while keeping its square texels. Retain only the current landscape size when resizing.

Add a themed Windows title bar with native drag, resize and minimize/maximize/close hit regions. Remove the duplicated navigation wordmark and keep tabs left-aligned. macOS and Linux retain native title bars. Suggested label: feature for the custom title bar.

Checked open launcher PRs and issues before preparing this change. #1499 concerns a different UI-thread deletion freeze and is not closed by this PR. The Windows startup/terminal changes from the same testing session are submitted separately.

Vanilla reference

Horizon-only launcher UI; follows docs/design-system.md (Blocks). No gameplay changes or Mojang files.

Self-check

pr_ready (tools/pr_ready.py on DESKTOP-KI5NGSR, against origin/main at 7fca3c2f9, 23 s)

Check Result
Scope ✅ 8 files, +250 −45
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ❌ failed (4 s)
launcher tests ✅ 111 passed (16 s)
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Additional validation: cargo test --manifest-path launcher/Cargo.toml --locked --lib --bins — 111 library tests and 28 binary tests passed (two existing ignored tests). New tests cover narrow/wide landscape sizes, whole-pixel rendering, cache reuse and replacement.

Windows strict Clippy reports existing unused name_in and link_stays_inside helpers in launcher/src/mojang.rs. The draft records this failure without suppressing warnings. Vanilla harnesses need maintainer CI data. Robert confirmed the resulting UI and window controls work on Windows; macOS/Linux visual behavior has not been manually tested.

Screenshots

Before: reported wide-window layout.

Before

After: updated title bar, left-aligned tabs and responsive banner at the default window size.

After

🤖 Generated with OpenAI Codex (GPT-6.1 Sol).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1574 **Author:** [@RobertTGreat](https://github.com/RobertTGreat) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-window-layout` --- ### 📝 Commits (2) - [`4ebba25`](https://github.com/horizon-rust/horizon/commit/4ebba25280031b1d4d9902a4d7a9814aa67c4ee7) fix(launcher): fill window width and add Windows title bar - [`6d81b98`](https://github.com/horizon-rust/horizon/commit/6d81b98f183e62529c246bf72da23a69972f09f3) launcher: keep one landscape per width step, free replaced ones, keep the top bar's wordmark off Windows ### 📊 Changes **6 files changed** (+317 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `launcher/README.md` (+4 -0) 📝 `launcher/src/art.rs` (+104 -50) 📝 `launcher/src/main.rs` (+48 -34) 📝 `launcher/src/scrollbar.rs` (+4 -1) 📝 `launcher/src/theme.rs` (+1 -0) ➕ `launcher/src/titlebar.rs` (+156 -0) </details> ### 📄 Description > 🤖 Opened by Robert's AI agent (OpenAI Codex / GPT-6.1 Sol), not by Robert himself. ## What and why Wide launcher windows leave an empty strip because the page is capped at 1,152 px and the landscape is fixed at 1,320 px. Let the existing page fill the available width and generate the landscape at that width while keeping its square texels. Retain only the current landscape size when resizing. Add a themed Windows title bar with native drag, resize and minimize/maximize/close hit regions. Remove the duplicated navigation wordmark and keep tabs left-aligned. macOS and Linux retain native title bars. Suggested label: `feature` for the custom title bar. Checked open launcher PRs and issues before preparing this change. #1499 concerns a different UI-thread deletion freeze and is not closed by this PR. The Windows startup/terminal changes from the same testing session are submitted separately. ## Vanilla reference Horizon-only launcher UI; follows `docs/design-system.md` (Blocks). No gameplay changes or Mojang files. ## Self-check **pr_ready** (`tools/pr_ready.py` on DESKTOP-KI5NGSR, against origin/main at 7fca3c2f9, 23 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +250 −45 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ❌ failed (4 s) | | launcher tests | ✅ 111 passed (16 s) | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Additional validation: `cargo test --manifest-path launcher/Cargo.toml --locked --lib --bins` — 111 library tests and 28 binary tests passed (two existing ignored tests). New tests cover narrow/wide landscape sizes, whole-pixel rendering, cache reuse and replacement. Windows strict Clippy reports existing unused `name_in` and `link_stays_inside` helpers in `launcher/src/mojang.rs`. The draft records this failure without suppressing warnings. Vanilla harnesses need maintainer CI data. Robert confirmed the resulting UI and window controls work on Windows; macOS/Linux visual behavior has not been manually tested. ## Screenshots Before: reported wide-window layout. ![Before](https://raw.githubusercontent.com/RobertTGreat/horizon/4ebba25280031b1d4d9902a4d7a9814aa67c4ee7/launcher/docs/launcher-window-before.png) After: updated title bar, left-aligned tabs and responsive banner at the default window size. ![After](https://raw.githubusercontent.com/RobertTGreat/horizon/4ebba25280031b1d4d9902a4d7a9814aa67c4ee7/launcher/docs/launcher-window-after.png) 🤖 Generated with [OpenAI Codex](https://openai.com/codex/) (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3602
No description provided.