[PR #5706] [CLOSED] Graphics settings: a Sodium-style video settings screen, with Horizon's own options #6450

Closed
opened 2026-11-03 06:20:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5706
Author: @some-du6e
Created: 11/1/2026
Status: ❌ Closed

Base: main ← Head: t3/sodium-style-video-settings


📝 Commits (3)

  • 1e51001 Graphics settings: Sodium's video settings screen, with Horizon's own options
  • 152de4f Graphics settings: keep the module list sorted
  • 7c9c1c2 Merge remote-tracking branch 'origin/main' into t3/sodium-style-video-settings

📊 Changes

5 files changed (+1941 additions, -1024 deletions)

View changed files

📝 crates/horizon-client-render/src/graphics.rs (+7 -4)
📝 crates/horizon-client-render/src/graphics_ui.rs (+1522 -983)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+14 -37)
➕ crates/horizon-client-render/src/sodium_style.rs (+397 -0)

📄 Description

Closes #5705.

The idea: make Horizon's graphics settings look and work exactly like Sodium's video settings, but with Horizon's own options in them. Until now they were two vanilla-style button lists (Simple and Advanced) plus a separate HDR screen. They held only Horizon's settings, so players had to switch back to Video Settings for the vanilla ones.

Before and after

What changed

The graphics settings screen is now built after Sodium 0.7's VideoSettingsScreen. Its sizes and colours come straight from Sodium's Layout and Colors, now in a new sodium_style.rs:

  • Layout. A search bar on top, a page list on the left, and one scrolling list holding every page: the mod header, ◆ Page headers, and options in groups. The hovered (or keyboard-focused) option's description and "Performance Impact" show in a panel to the right, with Sodium's arrow. When the GUI is too narrow for that panel, it uses Sodium's overlay tooltip. The content area narrows and centres on wide screens, the same way Sodium's does.
  • Controls. Tick boxes for on/off options, sliders that show their track while hovered or focused, and right-aligned values for cycling options. Disabled options are grey and struck through, and the tooltip says why.
  • Pages. Sodium's General, Quality, Performance and Advanced pages hold the vanilla video options together with Horizon's: LOD distance, culling, upscaling, frame pacing, shadow cache, screenshot quality and so on. HDR's settings get their own page. Clicking a page jumps to it, and the selection follows as you scroll.
  • Search. Press T or click the bar, then type to filter options by name or description. Escape clears it.
  • Done and Undo. Undo appears once something has changed and puts back the settings the screen opened with. There's no Apply button, because Horizon applies changes at once, as vanilla's screens do.

Vanilla's Video Settings screen is unchanged. Its "Horizon Graphics..." and "Advanced Graphics..." buttons open this screen at General and at Performance, and the HDR key opens it at the HDR page. The old Simple/Advanced row lists and the "HDR Settings..." entry are gone. The OpenAdvanced, OpenSimple and OpenHdr actions went with them.

Testing

  • I ran the game offscreen under Xvfb, before and after, and drove the screen with horizon-ctl: page jumps, hover tooltips, and both the wide and the narrow (overlay) tooltip. That's where the screenshots come from.
  • New unit tests in graphics_ui.rs check the geometry against Sodium's numbers at 640×360 and 427×240, plus page order and section jumps, list scrolling (10 px a notch, clamped), dragging the scrollbar thumb, slider tracks, HDR gating, search filtering, Undo, and keyboard navigation. Older tests that relied on the removed rows now read pages().
  • These checks run in CI: the dev box is shared and too loaded for pr_ready.py, so I didn't paste its block.

I couldn't add a label. The account has no triage rights, so this probably wants feature. At about 1,500 changed lines it's over the ~500-line guideline, because the screen's layout, drawing and input were rewritten together.

Note

Filed by Opus 5.5 using 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/5706 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `t3/sodium-style-video-settings` --- ### 📝 Commits (3) - [`1e51001`](https://github.com/horizon-rust/horizon/commit/1e5100175cd83c64d44f7fc2afc520ea390ffbfe) Graphics settings: Sodium's video settings screen, with Horizon's own options - [`152de4f`](https://github.com/horizon-rust/horizon/commit/152de4fa23ae10cd15f4998fd4b73bdc2065695e) Graphics settings: keep the module list sorted - [`7c9c1c2`](https://github.com/horizon-rust/horizon/commit/7c9c1c2443ea1098c38231ddfd91817e8368fc37) Merge remote-tracking branch 'origin/main' into t3/sodium-style-video-settings ### 📊 Changes **5 files changed** (+1941 additions, -1024 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/graphics.rs` (+7 -4) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+1522 -983) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+14 -37) ➕ `crates/horizon-client-render/src/sodium_style.rs` (+397 -0) </details> ### 📄 Description Closes #5705. The idea: make Horizon's graphics settings look and work exactly like Sodium's video settings, but with Horizon's own options in them. Until now they were two vanilla-style button lists (Simple and Advanced) plus a separate HDR screen. They held only Horizon's settings, so players had to switch back to Video Settings for the vanilla ones. ![Before and after](https://raw.githubusercontent.com/some-du6e/horizon/88191a930b5a4dd3e9d5ebdd69fbdf0c3662f806/sodium-video-settings/before-after.png) ## What changed The graphics settings screen is now built after Sodium 0.7's `VideoSettingsScreen`. Its sizes and colours come straight from Sodium's `Layout` and `Colors`, now in a new `sodium_style.rs`: - **Layout.** A search bar on top, a page list on the left, and one scrolling list holding every page: the mod header, `◆ Page` headers, and options in groups. The hovered (or keyboard-focused) option's description and "Performance Impact" show in a panel to the right, with Sodium's arrow. When the GUI is too narrow for that panel, it uses Sodium's overlay tooltip. The content area narrows and centres on wide screens, the same way Sodium's does. - **Controls.** Tick boxes for on/off options, sliders that show their track while hovered or focused, and right-aligned values for cycling options. Disabled options are grey and struck through, and the tooltip says why. - **Pages.** Sodium's General, Quality, Performance and Advanced pages hold the vanilla video options together with Horizon's: LOD distance, culling, upscaling, frame pacing, shadow cache, screenshot quality and so on. HDR's settings get their own page. Clicking a page jumps to it, and the selection follows as you scroll. - **Search.** Press T or click the bar, then type to filter options by name or description. Escape clears it. - **Done and Undo.** Undo appears once something has changed and puts back the settings the screen opened with. There's no Apply button, because Horizon applies changes at once, as vanilla's screens do. Vanilla's Video Settings screen is unchanged. Its "Horizon Graphics..." and "Advanced Graphics..." buttons open this screen at General and at Performance, and the HDR key opens it at the HDR page. The old Simple/Advanced row lists and the "HDR Settings..." entry are gone. The `OpenAdvanced`, `OpenSimple` and `OpenHdr` actions went with them. ## Testing - I ran the game offscreen under Xvfb, before and after, and drove the screen with `horizon-ctl`: page jumps, hover tooltips, and both the wide and the narrow (overlay) tooltip. That's where the screenshots come from. - New unit tests in `graphics_ui.rs` check the geometry against Sodium's numbers at 640×360 and 427×240, plus page order and section jumps, list scrolling (10 px a notch, clamped), dragging the scrollbar thumb, slider tracks, HDR gating, search filtering, Undo, and keyboard navigation. Older tests that relied on the removed rows now read `pages()`. - These checks run in CI: the dev box is shared and too loaded for `pr_ready.py`, so I didn't paste its block. I couldn't add a label. The account has no triage rights, so this probably wants `feature`. At about 1,500 changed lines it's over the ~500-line guideline, because the screen's layout, drawing and input were rewritten together. > [!NOTE] > Filed by Opus 5.5 using 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 06:20:51 +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#6450
No description provided.