[PR #208] [MERGED] Fix controls popup layout alignment #219

Closed
opened 2026-05-07 00:19:16 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/208
Author: @darsh-shah4548
Created: 1/31/2026
Status: Merged
Merged: 2/5/2026
Merged by: @IAmTomShaw

Base: mainHead: fix-controls-layout-spacing


📝 Commits (1)

  • 47f2340 Fix controls popup layout alignment

📊 Changes

1 file changed (+28 additions, -16 deletions)

View changed files

📝 src/ui_components.py (+28 -16)

📄 Description

Summary

  • Use two-column layout with fixed x positions instead of space-based alignment
  • Keys are rendered bold/white at a fixed left position, descriptions rendered gray at a fixed right position
  • This fixes the inconsistent spacing issue since the font is not monospace and characters like arrows have different widths

Before

before
Keys and descriptions had inconsistent spacing due to variable character widths in the proportional font.

Screenshot 2026-02-01 at 2 17 16 PM

After

Keys and descriptions are now properly aligned using fixed column positions.

Screenshot 2026-02-01 at 2 18 33 PM

Test plan

  • Run the app and open a race replay
  • Press H to open the controls popup
  • Verify keys and descriptions are properly aligned

Fixes #65


🔄 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/IAmTomShaw/f1-race-replay/pull/208 **Author:** [@darsh-shah4548](https://github.com/darsh-shah4548) **Created:** 1/31/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@IAmTomShaw](https://github.com/IAmTomShaw) **Base:** `main` ← **Head:** `fix-controls-layout-spacing` --- ### 📝 Commits (1) - [`47f2340`](https://github.com/IAmTomShaw/f1-race-replay/commit/47f2340f91470ee706ab823d6d5d7b8518f7b095) Fix controls popup layout alignment ### 📊 Changes **1 file changed** (+28 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `src/ui_components.py` (+28 -16) </details> ### 📄 Description ## Summary - Use two-column layout with fixed x positions instead of space-based alignment - Keys are rendered bold/white at a fixed left position, descriptions rendered gray at a fixed right position - This fixes the inconsistent spacing issue since the font is not monospace and characters like arrows have different widths ## Before ![before](https://github.com/IAmTomShaw/f1-race-replay/issues/65) Keys and descriptions had inconsistent spacing due to variable character widths in the proportional font. <img width="361" height="270" alt="Screenshot 2026-02-01 at 2 17 16 PM" src="https://github.com/user-attachments/assets/1af1b9b2-cda2-4a53-92cc-83786d1926a3" /> ## After Keys and descriptions are now properly aligned using fixed column positions. <img width="354" height="266" alt="Screenshot 2026-02-01 at 2 18 33 PM" src="https://github.com/user-attachments/assets/82e7fd16-4f46-4a1a-9957-8d7cfd96bed9" /> ## Test plan - [x] Run the app and open a race replay - [x] Press H to open the controls popup - [x] Verify keys and descriptions are properly aligned Fixes #65 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:19:16 +02: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
starred/f1-race-replay#219
No description provided.