[PR #2636] [MERGED] launcher: an accent colour and a picture behind Home #4490

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-themes


📝 Commits (1)

  • 8beaa57 launcher: an accent colour and a picture behind Home

📊 Changes

12 files changed (+577 additions, -31 deletions)

View changed files

📝 docs/launcher-commands.md (+2 -2)
📝 launcher/README.md (+7 -0)
📝 launcher/lang/fr.json (+9 -1)
📝 launcher/lang/ru.json (+9 -1)
📝 launcher/src/backend.rs (+29 -0)
📝 launcher/src/cli.rs (+24 -2)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+25 -11)
📝 launcher/src/theme.rs (+8 -14)
➕ launcher/src/themes.rs (+201 -0)
➕ launcher/src/themes/tests.rs (+107 -0)
➕ launcher/src/themes_page.rs (+155 -0)

📄 Description

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

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Launcher features, item 20: an accent colour and a picture behind Home. Both sit on top of Dark, Light and System. Stacked on #2635 (language).

  • Accent colour (Settings > Launcher): seven swatches. Violet, Horizon's own, stays the default; the others are blue, teal, green, amber, red and pink.
    • How a colour is made (launcher/src/themes.rs):
      • The violet tokens in horizon_theme::Blocks (the accent, and the Play button's face, bevel and lip) are turned to the accent's hue, keeping their saturation and lightness.
      • Each colour is then darkened or lightened just enough to read as well as the violet: white on the face at 4.5:1, and the accent at 3:1 on every background.
      • The bevel stays lighter than the face, and the lip darker.
    • It applies at once, everywhere the accent shows: Play, the nav underline, switches, section icons and focus rings.
    • The default look is unchanged: violet returns the tokens as they are.
  • Home background:
    • Choose a picture… takes a PNG, JPEG or WebP and shows it behind Home's banner, cropped to fill it. The banner's veils stay, so the title and Play read the same.
    • Landscape brings Horizon's landscape back.
    • The picture is checked before it is kept: a picture the decoders read, at least 64×64, under 40 MB. A refusal says why, under the row.
    • It is copied into the data folder under a name of its hash (background-<hash>.<ext>). A new picture gets a new name, so the window doesn't show the one it cached; the older file is removed.
  • settings.json gains accent (an unknown one from a newer launcher reads as violet and keeps the other settings) and background.
  • CLI and MCP:
    • settings accent violet|blue|teal|green|amber|red|pink;
    • settings background PATH|default;
    • settings shows both.
  • The new strings are in French and Russian (#2635's tables). launcher/README.md has a bullet; docs/launcher-commands.md is regenerated.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (193 + 36). The new tests:
    • Every accent reads as well as the violet, in both looks: text on the face ≥ 4.5, the accent ≥ 3 on page, raised, button, panel and well, and text on a selected suggestion ≥ 4.5. The face keeps the accent's hue, and violet leaves the tokens untouched.
    • Colours go to HSL and back exactly. Accent names parse.
    • A background is a picture kept once:
      • a new one replaces the old;
      • too small, not a picture and a wrong extension are refused, and a refused file keeps the old one;
      • a name with a path is ignored.
    • The accent is violet unless picked, and an unknown one keeps the rest.
  • CLI, scratch homes, with a picture drawn for this:
    • settings background dusk.png → kept.
    • settings accent plaid → "plaid: say violet, blue, teal, green, amber, red, pink".
  • Window, scratch homes:
    • Home showed the picture under the veils.
    • Teal recoloured Play, the nav underline and the icons at once.
    • Light + amber.
    • Landscape brought the landscape back.
    • Choose a picture… through the macOS dialog: a 64×32 file was refused ("too small to fill Home"). Another picture then replaced the first live, and the old file was removed.
Picture behind Home Teal Settings rows Light, amber Light, picture Refused Swapped live

🤖 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/2636 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-themes` --- ### 📝 Commits (1) - [`8beaa57`](https://github.com/horizon-rust/horizon/commit/8beaa57331d3bf1d89d93eda0c09feeb4b49dca7) launcher: an accent colour and a picture behind Home ### 📊 Changes **12 files changed** (+577 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+2 -2) 📝 `launcher/README.md` (+7 -0) 📝 `launcher/lang/fr.json` (+9 -1) 📝 `launcher/lang/ru.json` (+9 -1) 📝 `launcher/src/backend.rs` (+29 -0) 📝 `launcher/src/cli.rs` (+24 -2) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+25 -11) 📝 `launcher/src/theme.rs` (+8 -14) ➕ `launcher/src/themes.rs` (+201 -0) ➕ `launcher/src/themes/tests.rs` (+107 -0) ➕ `launcher/src/themes_page.rs` (+155 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Launcher features, item 20: an accent colour and a picture behind Home. Both sit on top of Dark, Light and System. Stacked on #2635 (language). - **Accent colour** (Settings > Launcher): seven swatches. Violet, Horizon's own, stays the default; the others are blue, teal, green, amber, red and pink. - How a colour is made (`launcher/src/themes.rs`): - The violet tokens in `horizon_theme::Blocks` (the accent, and the Play button's face, bevel and lip) are turned to the accent's hue, keeping their saturation and lightness. - Each colour is then darkened or lightened just enough to read as well as the violet: white on the face at 4.5:1, and the accent at 3:1 on every background. - The bevel stays lighter than the face, and the lip darker. - It applies at once, everywhere the accent shows: Play, the nav underline, switches, section icons and focus rings. - The default look is unchanged: violet returns the tokens as they are. - **Home background**: - **Choose a picture…** takes a PNG, JPEG or WebP and shows it behind Home's banner, cropped to fill it. The banner's veils stay, so the title and Play read the same. - **Landscape** brings Horizon's landscape back. - The picture is checked before it is kept: a picture the decoders read, at least 64×64, under 40 MB. A refusal says why, under the row. - It is copied into the data folder under a name of its hash (`background-<hash>.<ext>`). A new picture gets a new name, so the window doesn't show the one it cached; the older file is removed. - `settings.json` gains `accent` (an unknown one from a newer launcher reads as violet and keeps the other settings) and `background`. - CLI and MCP: - `settings accent violet|blue|teal|green|amber|red|pink`; - `settings background PATH|default`; - `settings` shows both. - The new strings are in French and Russian (#2635's tables). launcher/README.md has a bullet; docs/launcher-commands.md is regenerated. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (193 + 36). The new tests: - Every accent reads as well as the violet, in both looks: text on the face ≥ 4.5, the accent ≥ 3 on page, raised, button, panel and well, and text on a selected suggestion ≥ 4.5. The face keeps the accent's hue, and violet leaves the tokens untouched. - Colours go to HSL and back exactly. Accent names parse. - A background is a picture kept once: - a new one replaces the old; - too small, not a picture and a wrong extension are refused, and a refused file keeps the old one; - a name with a path is ignored. - The accent is violet unless picked, and an unknown one keeps the rest. - CLI, scratch homes, with a picture drawn for this: - `settings background dusk.png` → kept. - `settings accent plaid` → "plaid: say violet, blue, teal, green, amber, red, pink". - Window, scratch homes: - Home showed the picture under the veils. - Teal recoloured Play, the nav underline and the icons at once. - Light + amber. - **Landscape** brought the landscape back. - **Choose a picture…** through the macOS dialog: a 64×32 file was refused ("too small to fill Home"). Another picture then replaced the first live, and the old file was removed. | Picture behind Home | Teal | Settings rows | Light, amber | Light, picture | Refused | Swapped live | |---|---|---|---|---|---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/home-picture.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/teal.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/settings.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/light-amber.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/light-picture.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/refused.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/themes/swapped.png) | 🤖 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 04:17:33 +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#4490
No description provided.