Skip to content

Commit 3459440

Browse files
Simplify
1 parent 484695d commit 3459440

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

  • internal_filesystem/builtin/apps/com.micropythonos.launcher/assets

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,9 @@ def onResume(self, screen):
122122
label.set_style_text_align(lv.TEXT_ALIGN.CENTER, lv.PART.MAIN)
123123

124124
# ----- events --------------------------------------------------
125-
app_cont.add_event_cb(
126-
lambda e, fullname=app.fullname: AppManager.start_app(fullname),
127-
lv.EVENT.CLICKED, None)
128-
app_cont.add_event_cb(
129-
lambda e, cont=app_cont: self.focus_app_cont(cont),
130-
lv.EVENT.FOCUSED, None)
131-
app_cont.add_event_cb(
132-
lambda e, cont=app_cont: self.defocus_app_cont(cont),
133-
lv.EVENT.DEFOCUSED, None)
125+
app_cont.add_event_cb(lambda e, fullname=app.fullname: AppManager.start_app(fullname),lv.EVENT.CLICKED, None)
126+
app_cont.add_event_cb(lambda e, cont=app_cont: self.focus_app_cont(cont),lv.EVENT.FOCUSED, None)
127+
app_cont.add_event_cb(lambda e, cont=app_cont: self.defocus_app_cont(cont),lv.EVENT.DEFOCUSED, None)
134128

135129
if focusgroup:
136130
focusgroup.add_obj(app_cont)

0 commit comments

Comments
 (0)