From d20794f90011d5b72432dca8a6070687498ce906 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 1 May 2026 02:01:23 -0700 Subject: [PATCH] mici home: alerts pill touch zone only when alerts (#37940) * fix * clean up --- selfdrive/ui/mici/layouts/home.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/selfdrive/ui/mici/layouts/home.py b/selfdrive/ui/mici/layouts/home.py index 8a71e2efe..f9a85a8fb 100644 --- a/selfdrive/ui/mici/layouts/home.py +++ b/selfdrive/ui/mici/layouts/home.py @@ -14,7 +14,6 @@ from openpilot.system.version import RELEASE_BRANCHES HEAD_BUTTON_FONT_SIZE = 40 HOME_PADDING = 8 -SETTINGS_ZONE_WIDTH = 280 ALERTS_ZONE_WIDTH = 180 NetworkType = log.DeviceState.NetworkType @@ -205,12 +204,11 @@ class MiciHomeLayout(Widget): if not self._did_long_press: relative_x = mouse_pos.x - self.rect.x has_alerts = self._alert_count_callback and self._alert_count_callback() > 0 - if relative_x < SETTINGS_ZONE_WIDTH: - if self._on_settings_click: - self._on_settings_click() - elif has_alerts and relative_x > self.rect.width - ALERTS_ZONE_WIDTH: + if has_alerts and relative_x > self.rect.width - ALERTS_ZONE_WIDTH: if self._on_alerts_click: self._on_alerts_click() + elif self._on_settings_click: + self._on_settings_click() self._did_long_press = False def _get_version_text(self) -> tuple[str, str, str, str] | None: