From 7dc56dc064907fc2de4bcd3bd4bae6292c44d084 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 17 Feb 2026 15:01:07 -0800 Subject: [PATCH] draw black bg behind BigButton --- selfdrive/ui/mici/widgets/button.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/ui/mici/widgets/button.py b/selfdrive/ui/mici/widgets/button.py index 101f3bb56..3fb5bce96 100644 --- a/selfdrive/ui/mici/widgets/button.py +++ b/selfdrive/ui/mici/widgets/button.py @@ -220,6 +220,10 @@ class BigButton(Widget): btn_x = self._rect.x + (self._rect.width * (1 - scale)) / 2 btn_y = self._rect.y + (self._rect.height * (1 - scale)) / 2 + # draw black background since images are transparent + scaled_rect = rl.Rectangle(btn_x, btn_y, self._rect.width * scale, self._rect.height * scale) + rl.draw_rectangle_rounded(scaled_rect, 0.4, 7, rl.Color(0, 0, 0, int(255 * 0.5))) + self._draw_content(btn_y) rl.draw_texture_ex(txt_bg, (btn_x, btn_y), 0, scale, rl.WHITE)