From ac08c79139413ff703fc6fdcdeeb5fb9c7c0008e Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 26 Feb 2026 16:19:12 -0800 Subject: [PATCH] BigButton: sublabel takes all available space (#37431) change --- selfdrive/ui/mici/widgets/button.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/ui/mici/widgets/button.py b/selfdrive/ui/mici/widgets/button.py index 1faf3222d..231dafa8e 100644 --- a/selfdrive/ui/mici/widgets/button.py +++ b/selfdrive/ui/mici/widgets/button.py @@ -218,9 +218,9 @@ class BigButton(Widget): self._label.render(label_rect) if self.value: - label_y = btn_y + self._rect.height - self.LABEL_VERTICAL_PADDING - sub_label_height = self._sub_label.get_content_height(self._width_hint()) - sub_label_rect = rl.Rectangle(label_x, label_y - sub_label_height, self._width_hint(), sub_label_height) + label_y = btn_y + self.LABEL_VERTICAL_PADDING + self._label.get_content_height(self._width_hint()) + sub_label_height = btn_y + self._rect.height - self.LABEL_VERTICAL_PADDING - label_y + sub_label_rect = rl.Rectangle(label_x, label_y, self._width_hint(), sub_label_height) self._sub_label.render(sub_label_rect) # ICON -------------------------------------------------------------------