Skip to content

Commit ea9b5b1

Browse files
OSUpdate App: enable scrolling with joystick/arrow keys
1 parent ab91c6d commit ea9b5b1

File tree

1 file changed

+5
-0
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets

1 file changed

+5
-0
lines changed

internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ class OSUpdate(Activity):
2323
def onCreate(self):
2424
self.main_screen = lv.obj()
2525
self.main_screen.set_style_pad_all(mpos.ui.pct_of_display_width(2), 0)
26+
27+
# Make the screen focusable so it can be scrolled with the arrow keys
28+
if focusgroup := lv.group_get_default():
29+
focusgroup.add_obj(self.main_screen)
30+
2631
self.current_version_label = lv.label(self.main_screen)
2732
self.current_version_label.align(lv.ALIGN.TOP_LEFT,0,0)
2833
self.current_version_label.set_text(f"Installed OS version: {mpos.info.CURRENT_OS_VERSION}")

0 commit comments

Comments
 (0)