mici ui: fix missing home show event (#37347)

fix missing
This commit is contained in:
Shane Smiskol
2026-02-23 01:40:56 -08:00
committed by GitHub
parent 8d0cb9c8cf
commit c16879f2b8

View File

@@ -62,6 +62,12 @@ class MiciMainLayout(Widget):
self._onroad_layout.set_click_callback(lambda: self._scroll_to(self._home_layout))
device.add_interactive_timeout_callback(self._on_interactive_timeout)
def show_event(self):
self._scroller.show_event()
def hide_event(self):
self._scroller.hide_event()
def _scroll_to(self, layout: Widget):
layout_x = int(layout.rect.x)
self._scroller.scroll_to(layout_x, smooth=True)