[PR #7846] Debug overlay: half the automatic scale, rounded up #7860

Open
opened 2026-11-03 07:25:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7846
Author: @itarqos5
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/debug-overlay-odd-scale


📝 Commits (1)

  • 3ecc48b fix(debug): half the automatic scale, rounded up, for the F3 overlay

📊 Changes

1 file changed (+13 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/debug_overlay.rs (+13 -1)

📄 Description

🤖 Opened by itarqos5's AI agent (Claude Opus 5), not by itarqos5 personally.

debugGuiScale 0 (Auto, the default) means half the automatic GUI scale, and the halving truncated. An even automatic scale halves exactly either way; an odd one lost a whole step.

Window Automatic scale Debug scale before After
1920x1080 maximised 4 2 (half) 2 (unchanged)
854x709 2 1 (half) 1 (unchanged)
1280x720 restored down 3 1 (a third) 2 (a half)

So the F3 overlay was drawn smaller, relative to the rest of the screen, on a restored-down window than on a maximised one. Reported by a player who noticed exactly that.

Rounding up gives an odd scale the nearer usable half. Every even automatic scale is byte-identical, which is why the existing 854x709 and 1920x1080 expectations in debug_scale_is_half_the_automatic_scale still hold unchanged; a 1280x720 case is added beside them.

Checks

  • cargo test -p horizon-client-lib --lib debug_overlay — 8 passed, 0 failed, on this branch off a clean origin/main
  • Not a full tools/pr_ready.py run. Earlier in the session it failed clippy with 12 pre-existing clippy::manual_range_contains errors in horizon-world, untouched by this branch, under a nightly toolchain (1.96); cargo +stable clippy on the touched crates was clean. The vanilla harnesses were not run here.
  • No parity harness covers the debug overlay (tools/ has none for it), and this is Horizon's own debugGuiScale handling rather than a vanilla code path.

🤖 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/7846 **Author:** [@itarqos5](https://github.com/itarqos5) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/debug-overlay-odd-scale` --- ### 📝 Commits (1) - [`3ecc48b`](https://github.com/horizon-rust/horizon/commit/3ecc48b4c7b6db46e206a9ac5eb1eb9bbb21d203) fix(debug): half the automatic scale, rounded up, for the F3 overlay ### 📊 Changes **1 file changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/debug_overlay.rs` (+13 -1) </details> ### 📄 Description > 🤖 Opened by itarqos5's AI agent (Claude Opus 5), not by itarqos5 personally. `debugGuiScale` 0 (Auto, the default) means half the automatic GUI scale, and the halving truncated. An even automatic scale halves exactly either way; an odd one lost a whole step. | Window | Automatic scale | Debug scale before | After | |---|---|---|---| | 1920x1080 maximised | 4 | 2 (half) | 2 (unchanged) | | 854x709 | 2 | 1 (half) | 1 (unchanged) | | **1280x720 restored down** | **3** | **1 (a third)** | **2 (a half)** | So the F3 overlay was drawn smaller, relative to the rest of the screen, on a restored-down window than on a maximised one. Reported by a player who noticed exactly that. Rounding up gives an odd scale the nearer usable half. **Every even automatic scale is byte-identical**, which is why the existing `854x709` and `1920x1080` expectations in `debug_scale_is_half_the_automatic_scale` still hold unchanged; a 1280x720 case is added beside them. ## Checks - `cargo test -p horizon-client-lib --lib debug_overlay` — **8 passed, 0 failed**, on this branch off a clean `origin/main` - Not a full `tools/pr_ready.py` run. Earlier in the session it failed clippy with 12 pre-existing `clippy::manual_range_contains` errors in `horizon-world`, untouched by this branch, under a nightly toolchain (1.96); `cargo +stable clippy` on the touched crates was clean. The vanilla harnesses were not run here. - No parity harness covers the debug overlay (`tools/` has none for it), and this is Horizon's own `debugGuiScale` handling rather than a vanilla code path. 🤖 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>
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#7860
No description provided.