[PR #6921] [MERGED] Extras: Scroll wheel changes settings (off: the wheel only scrolls the list) #7196

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6921
Author: @GIGABAIT93
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: feat/wheel-cycles-setting


📝 Commits (2)

  • 2113057 Extras: the scroll wheel can leave settings alone
  • c89c952 Merge upstream main

📊 Changes

6 files changed (+103 additions, -5 deletions)

View changed files

📝 crates/horizon-client-render/src/extras.rs (+24 -4)
📝 crates/horizon-client-render/src/graphics_ui.rs (+14 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+51 -1)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+3 -0)
📝 crates/horizon-client/assets/horizon/lang/uk_ua.json (+3 -0)
📝 docs/extras.md (+8 -0)

📄 Description

🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly.

Closes #5455

What

A new extra, Scroll wheel changes settings (wheelCyclesSettings in horizon-extras.txt), under a new Menus header on the Extras page. It is on by default, so a fresh install keeps vanilla's CycleButton.mouseScrolled: the wheel over a cycle button changes its value. With it off, the wheel only scrolls the list under the cursor. Scrolling a long page (Video, Controls) then can't change an option that passes under the pointer.

#5456 did this first. It was approved, then closed by its author without merging. This version also covers two paths that one missed:

  • Video's own pages (GraphicsUi::wheel). Those pages return before the plain check in OptionsUi::wheel, so a gate there alone left them cycling.
  • A keyboard- or pad-focused option. Horizon's divergence lets the wheel step such an option wherever the cursor is. With the extra off it doesn't, because "off" means the wheel only scrolls.

Changes

  • extras.rs: the field, parsing and saving, Item::WheelCyclesSettings (caption, tooltip, switch, cycle), and its row under horizon.extras.header.menus.
  • options_ui.rs and graphics_ui.rs: with the extra off, wheel scrolls and returns before any cycle or step.
  • en_us.json and uk_ua.json: the caption, the tooltip and the header. Other languages fall back to English until translated.
  • docs/extras.md: a section for the extra.

Tests

  • options_ui::tests::the_wheel_only_scrolls_with_the_extra_off (new): on the Video page, with the extra off, a visible cycle button under the cursor stays put, the list scrolls, and a keyboard-focused option doesn't take the wheel. With it on, the wheel cycles the option again. With the gate in OptionsUi::wheel removed, the test fails.
  • graphics_ui::tests::graphics_cycle_wheel_cycles_and_slider_falls_through_to_scroll (extended): Far Detail doesn't cycle with the extra off, and the page scrolls.
  • extras::tests::everything_is_off_by_default_and_round_trips (extended): on by default, and it round-trips through horizon-extras.txt.

On Windows 11, all of cargo test -p horizon-client-render --lib passes except gfx::entity_skin::tests::the_shader_writes_what_the_cpu_reference_computes. That test fails the same way on a clean upstream/main on this GPU, and this PR doesn't touch it.

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at e6e008dff, 9 min 42 s)

Check Result
Scope ✅ 6 files, +103 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 610 passed (51 s)
rustfmt ✅ (13 s)
clippy ✅ (4 min 52 s)
tests: horizon-client-lib, horizon-client-render ❌ 1390 passed (3 min 38 s)
doc tests ✅ 0 passed (6 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): 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)

The ❌ above is WSL's GPU, not this change. gfx:: tests crash with SIGSEGV now and then under WSL: on the same commit, cargo test -p horizon-client-render --lib -- gfx:: passed once (203) and segfaulted three times, and the base commit segfaults the same way. Without gfx::, all 868 other tests pass, the new ones included. CI runs them on a real runner.

🤖 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/6921 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/wheel-cycles-setting` --- ### 📝 Commits (2) - [`2113057`](https://github.com/horizon-rust/horizon/commit/2113057446e52e3d956bb9b8ede0c174fdea36b8) Extras: the scroll wheel can leave settings alone - [`c89c952`](https://github.com/horizon-rust/horizon/commit/c89c95255d9fdcdad1b3112143187f13b778cc89) Merge upstream main ### 📊 Changes **6 files changed** (+103 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/extras.rs` (+24 -4) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+14 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+51 -1) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+3 -0) 📝 `crates/horizon-client/assets/horizon/lang/uk_ua.json` (+3 -0) 📝 `docs/extras.md` (+8 -0) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. Closes #5455 ## What A new extra, **Scroll wheel changes settings** (`wheelCyclesSettings` in `horizon-extras.txt`), under a new **Menus** header on the Extras page. It is **on by default**, so a fresh install keeps vanilla's `CycleButton.mouseScrolled`: the wheel over a cycle button changes its value. With it off, the wheel only scrolls the list under the cursor. Scrolling a long page (Video, Controls) then can't change an option that passes under the pointer. #5456 did this first. It was approved, then closed by its author without merging. This version also covers two paths that one missed: - **Video's own pages** (`GraphicsUi::wheel`). Those pages return before the `plain` check in `OptionsUi::wheel`, so a gate there alone left them cycling. - **A keyboard- or pad-focused option.** Horizon's divergence lets the wheel step such an option wherever the cursor is. With the extra off it doesn't, because "off" means the wheel only scrolls. ## Changes - `extras.rs`: the field, parsing and saving, `Item::WheelCyclesSettings` (caption, tooltip, switch, cycle), and its row under `horizon.extras.header.menus`. - `options_ui.rs` and `graphics_ui.rs`: with the extra off, `wheel` scrolls and returns before any cycle or step. - `en_us.json` and `uk_ua.json`: the caption, the tooltip and the header. Other languages fall back to English until translated. - `docs/extras.md`: a section for the extra. ## Tests - `options_ui::tests::the_wheel_only_scrolls_with_the_extra_off` (new): on the Video page, with the extra off, a visible cycle button under the cursor stays put, the list scrolls, and a keyboard-focused option doesn't take the wheel. With it on, the wheel cycles the option again. With the gate in `OptionsUi::wheel` removed, the test fails. - `graphics_ui::tests::graphics_cycle_wheel_cycles_and_slider_falls_through_to_scroll` (extended): Far Detail doesn't cycle with the extra off, and the page scrolls. - `extras::tests::everything_is_off_by_default_and_round_trips` (extended): on by default, and it round-trips through `horizon-extras.txt`. On Windows 11, all of `cargo test -p horizon-client-render --lib` passes except `gfx::entity_skin::tests::the_shader_writes_what_the_cpu_reference_computes`. That test fails the same way on a clean `upstream/main` on this GPU, and this PR doesn't touch it. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at e6e008dff, 9 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +103 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 610 passed (51 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (4 min 52 s) | | tests: horizon-client-lib, horizon-client-render | ❌ 1390 passed (3 min 38 s) | | doc tests | ✅ 0 passed (6 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): 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) | The ❌ above is WSL's GPU, not this change. `gfx::` tests crash with SIGSEGV now and then under WSL: on the same commit, `cargo test -p horizon-client-render --lib -- gfx::` passed once (203) and segfaulted three times, and the base commit segfaults the same way. Without `gfx::`, all 868 other tests pass, the new ones included. CI runs them on a real runner. 🤖 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 06:35:31 +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#7196
No description provided.