[PR #4552] [MERGED] Launcher: instance icons, pictures and loader marks (redesign R8b) #5692

Closed
opened 2026-11-03 05:14:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-instance-icons


📝 Commits (2)

  • b6e7d3e Launcher: instance icons, pictures and loader marks (redesign R8b)
  • d2fe5c0 Merge remote-tracking branch 'origin/main' into feat/launcher-instance-icons

📊 Changes

19 files changed (+450 additions, -46 deletions)

View changed files

📝 THIRD_PARTY_NOTICES.md (+19 -0)
📝 docs/design-system.md (+7 -0)
➕ launcher/assets/logos/neoforge.png (+0 -0)
➕ launcher/assets/logos/quilt.png (+0 -0)
📝 launcher/lang/de.json (+2 -1)
📝 launcher/lang/es.json (+2 -1)
📝 launcher/lang/fr.json (+2 -1)
📝 launcher/lang/pl.json (+2 -1)
📝 launcher/lang/ru.json (+2 -1)
📝 launcher/lang/uk.json (+2 -1)
📝 launcher/lang/zh.json (+2 -1)
📝 launcher/src/browser/images.rs (+14 -5)
📝 launcher/src/home.rs (+16 -4)
➕ launcher/src/instance_icons.rs (+185 -0)
📝 launcher/src/instances.rs (+51 -0)
📝 launcher/src/instances/tests.rs (+27 -0)
📝 launcher/src/instances_page.rs (+100 -29)
📝 launcher/src/main.rs (+5 -1)
📝 launcher/src/mods_page.rs (+12 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Ludovic has seen the screenshots and approved R8 (2026-10-30). R8a (#4520) has landed; this PR now targets main, with main merged in (d2fe5c076).

Redesign step R8b ("logos everywhere"): instance icons.

What

An instance's icon (sidebar, Home's hero beside the name, its Edit dialog) is now, in order:

  1. Its own picture. icon.png in the instance's game folder comes from either:
    • Choose image… in the dialog: any PNG, JPEG, GIF or WebP, read and scaled to 128 px off the UI thread, written on Save. Choosing a block, a colour or the mark moves the picture to the trash.
    • Its modpack's icon: when the Mods page installs a pack (Modrinth, CurseForge or Horizon's registry), its icon becomes the picture, unless the player already chose one.
  2. The block or colour chosen in the dialog, as before.
  3. Its mark.
    • The loader's logo:
      • Quilt and NeoForge are bundled (licenses below).
      • Fabric's and Forge's are fetched from their own sites into the image cache.
      • Imported packs use the loader their pack.json names.
    • The grass block for plain Minecraft (from the player's prepared files, as before).
    • Horizon's mark for Horizon instances; the default instance showed the grass block before.
  4. The letter tile, only as the fallback.

How icons are drawn:

  • Pixel-art logos are scaled by whole device pixels, so they stay sharp; larger images are scaled down smoothly.
  • Each image is decoded once per size. Whether a picture exists is checked once, and checked again when the instance list reloads.
  • The dialog's "none" tile shows the instance's mark.

The picture is a file, not a new instances.json field, so older launchers still read their instances.json.

Also fixed: the dialog's icon tiles sit in rows of eleven. A wrapping row was measured as one line, so the plate ended above Cancel and Save.

HORIZON_LAUNCHER_PAGE=edit-instance opens the selected instance's Edit dialog, for screenshots.

The owner gate, Play and every start path are untouched.

Logos and licenses (THIRD_PARTY_NOTICES.md)

Logo Source How
Quilt QuiltMC/art brand/128png/quilt_mini_icon_transparent.png, CC0 bundled
NeoForge neoforged/.github art/neoforged_icon_16x16.png, CC BY 4.0 (© NeoForged team, by Ridanisaurus) bundled, attributed
Fabric fabric-loader's icon.png (no published logo license) fetched from raw.githubusercontent.com/FabricMC/fabric-loader
Forge files.minecraftforge.net's favicon (no published logo license) fetched from files.minecraftforge.net

Both fetch hosts are added to the image allow-list, prefix-scoped to those two paths. Modrinth's logo is not used: Ludovic decided not to ask Rinth, Inc. for permission. Fabric's and Forge's stay fetched from their own sites, also his decision.

Screenshots (real launcher, scratch homes, 1280×800, Mac mini)

The seed covers every kind of icon: a picture, Horizon's mark, Fabric, Quilt, the grass block, and imported NeoForge and Forge packs.

In ~/builds/horizon/launcher-redesign-3/:

  • r8b-sidebar-picture-night-1280x800.png, r8b-sidebar-picture-dawn-1280x800.png: sidebar, and a picture in the hero.
  • r8b-fabric-night-1280x800.png, r8b-quilt-dawn-1280x800.png: loader marks in the hero.
  • r8b-edit-picture-night-1280x800.png, r8b-edit-fabric-night-1280x800.png: the Edit dialog with Choose image….

Performance (launcher CPU over 45 s at rest after 15 s, release, 3 interleaved rounds, all those instances in the sidebar)

Build Idle CPU (% of one core) RSS
R8a (#4520) 1.33 / 0.91 / 1.40 129 MB
R8b 0.84 / 1.11 / 1.24 129–130 MB

Raw: perf-r8b.txt.

Self-check

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at f788711fe, 3 min 22 s)

Check Result
Scope ✅ 19 files, +450 −46
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 481 passed (1 min 8 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (43 s)
launcher tests ✅ 300 passed (1 min 29 s)
Parity ➖ 2 affected, to run in CI (no vanilla data here): lan_integration, return_to_sender
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/4552 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-instance-icons` --- ### 📝 Commits (2) - [`b6e7d3e`](https://github.com/horizon-rust/horizon/commit/b6e7d3e7c0dc73c170eafe519bcca0b2d745fd52) Launcher: instance icons, pictures and loader marks (redesign R8b) - [`d2fe5c0`](https://github.com/horizon-rust/horizon/commit/d2fe5c0768f32e8bde78d443627f85f2c1a811a3) Merge remote-tracking branch 'origin/main' into feat/launcher-instance-icons ### 📊 Changes **19 files changed** (+450 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `THIRD_PARTY_NOTICES.md` (+19 -0) 📝 `docs/design-system.md` (+7 -0) ➕ `launcher/assets/logos/neoforge.png` (+0 -0) ➕ `launcher/assets/logos/quilt.png` (+0 -0) 📝 `launcher/lang/de.json` (+2 -1) 📝 `launcher/lang/es.json` (+2 -1) 📝 `launcher/lang/fr.json` (+2 -1) 📝 `launcher/lang/pl.json` (+2 -1) 📝 `launcher/lang/ru.json` (+2 -1) 📝 `launcher/lang/uk.json` (+2 -1) 📝 `launcher/lang/zh.json` (+2 -1) 📝 `launcher/src/browser/images.rs` (+14 -5) 📝 `launcher/src/home.rs` (+16 -4) ➕ `launcher/src/instance_icons.rs` (+185 -0) 📝 `launcher/src/instances.rs` (+51 -0) 📝 `launcher/src/instances/tests.rs` (+27 -0) 📝 `launcher/src/instances_page.rs` (+100 -29) 📝 `launcher/src/main.rs` (+5 -1) 📝 `launcher/src/mods_page.rs` (+12 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Ludovic has seen the screenshots and approved R8 (2026-10-30). R8a (#4520) has landed; this PR now targets main, with main merged in (d2fe5c076). Redesign step R8b ("logos everywhere"): instance icons. ## What An instance's icon (sidebar, Home's hero beside the name, its Edit dialog) is now, in order: 1. **Its own picture.** `icon.png` in the instance's game folder comes from either: - **Choose image…** in the dialog: any PNG, JPEG, GIF or WebP, read and scaled to 128 px off the UI thread, written on Save. Choosing a block, a colour or the mark moves the picture to the trash. - **Its modpack's icon:** when the Mods page installs a pack (Modrinth, CurseForge or Horizon's registry), its icon becomes the picture, unless the player already chose one. 2. **The block or colour** chosen in the dialog, as before. 3. **Its mark.** - The loader's logo: - Quilt and NeoForge are bundled (licenses below). - Fabric's and Forge's are fetched from their own sites into the image cache. - Imported packs use the loader their `pack.json` names. - The grass block for plain Minecraft (from the player's prepared files, as before). - Horizon's mark for Horizon instances; the default instance showed the grass block before. 4. **The letter tile**, only as the fallback. How icons are drawn: - Pixel-art logos are scaled by whole device pixels, so they stay sharp; larger images are scaled down smoothly. - Each image is decoded once per size. Whether a picture exists is checked once, and checked again when the instance list reloads. - The dialog's "none" tile shows the instance's mark. The picture is a file, not a new `instances.json` field, so older launchers still read their `instances.json`. Also fixed: the dialog's icon tiles sit in rows of eleven. A wrapping row was measured as one line, so the plate ended above Cancel and Save. `HORIZON_LAUNCHER_PAGE=edit-instance` opens the selected instance's Edit dialog, for screenshots. The owner gate, Play and every start path are untouched. ## Logos and licenses (THIRD_PARTY_NOTICES.md) | Logo | Source | How | |---|---|---| | Quilt | QuiltMC/art `brand/128png/quilt_mini_icon_transparent.png`, CC0 | bundled | | NeoForge | neoforged/.github `art/neoforged_icon_16x16.png`, CC BY 4.0 (© NeoForged team, by Ridanisaurus) | bundled, attributed | | Fabric | fabric-loader's `icon.png` (no published logo license) | fetched from raw.githubusercontent.com/FabricMC/fabric-loader | | Forge | files.minecraftforge.net's favicon (no published logo license) | fetched from files.minecraftforge.net | Both fetch hosts are added to the image allow-list, prefix-scoped to those two paths. Modrinth's logo is not used: Ludovic decided not to ask Rinth, Inc. for permission. Fabric's and Forge's stay fetched from their own sites, also his decision. ## Screenshots (real launcher, scratch homes, 1280×800, Mac mini) The seed covers every kind of icon: a picture, Horizon's mark, Fabric, Quilt, the grass block, and imported NeoForge and Forge packs. In `~/builds/horizon/launcher-redesign-3/`: - `r8b-sidebar-picture-night-1280x800.png`, `r8b-sidebar-picture-dawn-1280x800.png`: sidebar, and a picture in the hero. - `r8b-fabric-night-1280x800.png`, `r8b-quilt-dawn-1280x800.png`: loader marks in the hero. - `r8b-edit-picture-night-1280x800.png`, `r8b-edit-fabric-night-1280x800.png`: the Edit dialog with Choose image…. ## Performance (launcher CPU over 45 s at rest after 15 s, release, 3 interleaved rounds, all those instances in the sidebar) | Build | Idle CPU (% of one core) | RSS | |---|---|---| | R8a (#4520) | 1.33 / 0.91 / 1.40 | 129 MB | | **R8b** | **0.84 / 1.11 / 1.24** | 129–130 MB | Raw: `perf-r8b.txt`. ## Self-check **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at f788711fe, 3 min 22 s) | Check | Result | | --- | --- | | Scope | ✅ 19 files, +450 −46 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 481 passed (1 min 8 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (43 s) | | launcher tests | ✅ 300 passed (1 min 29 s) | | Parity | ➖ 2 affected, to run in CI (no vanilla data here): lan_integration, return_to_sender | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:21 +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#5692
No description provided.