From 0cbd8013b2dc95b81e224d7a2c508e9c9e8a2cf2 Mon Sep 17 00:00:00 2001 From: firestarsdog <229254897+firestarsdog@users.noreply.github.com> Date: Thu, 9 Jul 2026 20:21:55 -0400 Subject: [PATCH] BigUI WIP: Hit me baby one more time --- .../ui/layouts/settings/starpilot/aethergrid.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/selfdrive/ui/layouts/settings/starpilot/aethergrid.py b/selfdrive/ui/layouts/settings/starpilot/aethergrid.py index bb4439ea8..f1d2bdccb 100644 --- a/selfdrive/ui/layouts/settings/starpilot/aethergrid.py +++ b/selfdrive/ui/layouts/settings/starpilot/aethergrid.py @@ -5437,6 +5437,19 @@ class AetherSegmentedControl(Widget): self._option_offsets: list[float] = [] self._option_targets: list[float] = [] + @property + def _hit_rect(self) -> rl.Rectangle: + hit_rect = rl.Rectangle( + self._rect.x - GEOMETRY_OFFSET, + self._rect.y - GEOMETRY_OFFSET, + self._rect.width + 2 * GEOMETRY_OFFSET, + self._rect.height + 2 * GEOMETRY_OFFSET, + ) + parent_rect = getattr(self, "_parent_rect", None) + if parent_rect is not None: + return _intersect_rect(hit_rect, parent_rect) + return hit_rect + def _current(self) -> int: if callable(self._current_index): return max(0, min(len(self._options) - 1, int(self._current_index())))