[PR #5405] [MERGED] Let a tooltip sit at the top edge, where vanilla leaves it #6262

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

📋 Pull Request Information

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

Base: main ← Head: fix/tooltip-top-clamp


📝 Commits (2)

  • 1a26cd5 Let a tooltip sit at the top edge, where vanilla leaves it
  • 185441d Merge main into #5405 (main's title keyboard test was fixed in #5425)

📊 Changes

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

View changed files

📝 crates/horizon-client-render/src/ui.rs (+0 -1)

📄 Description

DefaultTooltipPositioner pushes a tooltip up only when it would run off the bottom; there is no lower bound on its y. Horizon also clamped y to 4, so a cursor within 16 px of the top of the screen had its tooltip shoved downwards where vanilla lets it start above the edge and be clipped.

One line deleted. The x clamp beside it is vanilla's own Math.max(pos.x - 24 - width, 4) and stays.

Not proven: no harness covers the tooltip geometry and splitting it out to assert two floats would be more code than the fix; compile-checked only.

One thing left deliberately: game/stations.rs has the same extra clamp in the separate hand-drawn item tooltip path, which is a different code path from this ledger row and would need its own change.


🔄 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/5405 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/tooltip-top-clamp` --- ### 📝 Commits (2) - [`1a26cd5`](https://github.com/horizon-rust/horizon/commit/1a26cd56438a00e0e541c5c5764081124e22db86) Let a tooltip sit at the top edge, where vanilla leaves it - [`185441d`](https://github.com/horizon-rust/horizon/commit/185441dd01d63e4253bbef55124ac2d3f7291506) Merge main into #5405 (main's title keyboard test was fixed in #5425) ### 📊 Changes **1 file changed** (+0 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/ui.rs` (+0 -1) </details> ### 📄 Description DefaultTooltipPositioner pushes a tooltip up only when it would run off the **bottom**; there is no lower bound on its y. Horizon also clamped y to 4, so a cursor within 16 px of the top of the screen had its tooltip shoved downwards where vanilla lets it start above the edge and be clipped. One line deleted. The x clamp beside it is vanilla's own Math.max(pos.x - 24 - width, 4) and stays. **Not proven:** no harness covers the tooltip geometry and splitting it out to assert two floats would be more code than the fix; compile-checked only. One thing left deliberately: game/stations.rs has the same extra clamp in the separate hand-drawn item tooltip path, which is a different code path from this ledger row and would need its own change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:16:43 +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#6262
No description provided.