You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Simplify
This commit is contained in:
@@ -122,15 +122,9 @@ class Launcher(Activity):
|
||||
label.set_style_text_align(lv.TEXT_ALIGN.CENTER, lv.PART.MAIN)
|
||||
|
||||
# ----- events --------------------------------------------------
|
||||
app_cont.add_event_cb(
|
||||
lambda e, fullname=app.fullname: AppManager.start_app(fullname),
|
||||
lv.EVENT.CLICKED, None)
|
||||
app_cont.add_event_cb(
|
||||
lambda e, cont=app_cont: self.focus_app_cont(cont),
|
||||
lv.EVENT.FOCUSED, None)
|
||||
app_cont.add_event_cb(
|
||||
lambda e, cont=app_cont: self.defocus_app_cont(cont),
|
||||
lv.EVENT.DEFOCUSED, None)
|
||||
app_cont.add_event_cb(lambda e, fullname=app.fullname: AppManager.start_app(fullname),lv.EVENT.CLICKED, None)
|
||||
app_cont.add_event_cb(lambda e, cont=app_cont: self.focus_app_cont(cont),lv.EVENT.FOCUSED, None)
|
||||
app_cont.add_event_cb(lambda e, cont=app_cont: self.defocus_app_cont(cont),lv.EVENT.DEFOCUSED, None)
|
||||
|
||||
if focusgroup:
|
||||
focusgroup.add_obj(app_cont)
|
||||
|
||||
Reference in New Issue
Block a user