[PR #71] [MERGED] Fix control UI icons rendering with PNG icons (follows up PR #43) #117

Closed
opened 2026-05-07 00:18:45 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/71
Author: @juliarzymowska
Created: 12/17/2025
Status: Merged
Merged: 12/17/2025
Merged by: @IAmTomShaw

Base: mainHead: fix-ui-icons


📝 Commits (3)

📊 Changes

7 files changed (+93 additions, -18 deletions)

View changed files

images/controls/arrow-down.png (+0 -0)
images/controls/arrow-left.png (+0 -0)
images/controls/arrow-right.png (+0 -0)
images/controls/arrow-up.png (+0 -0)
📝 src/interfaces/qualifying.py (+44 -10)
📝 src/interfaces/race_replay.py (+40 -8)
📝 src/ui_components.py (+9 -0)

📄 Description

Description

This PR is a follow-up to the previous icon rendering fix (#43).

After updating the weather icons, I noticed that the control/navigation icons were affected by the same issue:
text-based icons were not rendering correctly in my environment.

Solution

This PR replaces the text-based control/navigation icons with PNG icons, using the same approach as in the previous fix.

Before:
before

After:
after

Changes

  • Replaced text-based control/navigation icons with PNG icons
  • Updated related UI resources

Question

While working on the control icons, I noticed that the controls legend is currently rendered directly inside
qualifying.py and race_replay.py, even though a LegendComponent already exists in ui_components.py.

At the moment, both view files duplicate the legend drawing logic, instead of delegating rendering to the component itself.

Would you prefer:

  • keeping the legend rendering logic inside each view (as it is now), or
  • moving the full legend rendering into LegendComponent.draw(...) and passing layout parameters
    (e.g. margins / position) from the view?

I wasn’t sure if the legend placement depends too much on window size or view-specific margins
(e.g. left_ui_margin) to safely centralize this logic, so I kept the current structure for now.


🔄 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/71 **Author:** [@juliarzymowska](https://github.com/juliarzymowska) **Created:** 12/17/2025 **Status:** ✅ Merged **Merged:** 12/17/2025 **Merged by:** [@IAmTomShaw](https://github.com/IAmTomShaw) **Base:** `main` ← **Head:** `fix-ui-icons` --- ### 📝 Commits (3) - [`a6efa81`](https://github.com/IAmTomShaw/f1-race-replay/commit/a6efa81b368b689cec31f19a28136dd22d7f63de) add UI icons assets - [`c64d475`](https://github.com/IAmTomShaw/f1-race-replay/commit/c64d47589be9ddb114c0a9ae8b9f03216dd5e003) fix UI arrow icons - [`d495ddc`](https://github.com/IAmTomShaw/f1-race-replay/commit/d495ddc38559b2ece646ece461bea33317377f41) Merge branch 'main' into fix-ui-icons ### 📊 Changes **7 files changed** (+93 additions, -18 deletions) <details> <summary>View changed files</summary> ➕ `images/controls/arrow-down.png` (+0 -0) ➕ `images/controls/arrow-left.png` (+0 -0) ➕ `images/controls/arrow-right.png` (+0 -0) ➕ `images/controls/arrow-up.png` (+0 -0) 📝 `src/interfaces/qualifying.py` (+44 -10) 📝 `src/interfaces/race_replay.py` (+40 -8) 📝 `src/ui_components.py` (+9 -0) </details> ### 📄 Description ### Description This PR is a follow-up to the previous icon rendering fix (#43). After updating the weather icons, I noticed that the control/navigation icons were affected by the same issue: text-based icons were not rendering correctly in my environment. ### Solution This PR replaces the text-based control/navigation icons with PNG icons, using the same approach as in the previous fix. Before: <img width="311" height="168" alt="before" src="https://github.com/user-attachments/assets/057b8b0a-2910-4c45-aff9-d48c368b67d7" /> After: <img width="368" height="197" alt="after" src="https://github.com/user-attachments/assets/4a9abcb5-2a0c-4456-87bd-91cab9a65d37" /> ### Changes - Replaced text-based control/navigation icons with PNG icons - Updated related UI resources ### Question While working on the control icons, I noticed that the controls legend is currently rendered directly inside `qualifying.py` and `race_replay.py`, even though a `LegendComponent` already exists in `ui_components.py`. At the moment, both view files duplicate the legend drawing logic, instead of delegating rendering to the component itself. Would you prefer: - keeping the legend rendering logic inside each view (as it is now), or - moving the full legend rendering into `LegendComponent.draw(...)` and passing layout parameters (e.g. margins / position) from the view? I wasn’t sure if the legend placement depends too much on window size or view-specific margins (e.g. `left_ui_margin`) to safely centralize this logic, so I kept the current structure for now. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:18:45 +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#117
No description provided.