From 1d48cbdffa6392aaf20f4e5c8883fd6644317591 Mon Sep 17 00:00:00 2001 From: royjr Date: Mon, 23 Mar 2026 04:00:28 -0400 Subject: [PATCH] ui: fix BIG ui with scale (#37690) * Update application.py * Apply suggestions from code review --------- Co-authored-by: Shane Smiskol --- system/ui/lib/application.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/ui/lib/application.py b/system/ui/lib/application.py index 1d518309d3..980410b022 100644 --- a/system/ui/lib/application.py +++ b/system/ui/lib/application.py @@ -452,6 +452,11 @@ class GuiApplication: def texture(self, asset_path: str, width: int | None = None, height: int | None = None, alpha_premultiply=False, keep_aspect_ratio=True, flip_x: bool = False) -> rl.Texture: + if width is not None: + width = round(width) + if height is not None: + height = round(height) + cache_key = f"{asset_path}_{width}_{height}_{alpha_premultiply}_{keep_aspect_ratio}_{flip_x}" if cache_key in self._textures: return self._textures[cache_key]