Skip to content

Commit 8c4aa0d

Browse files
move topmenu stuff to mpos.ui.topmenu
1 parent fe81fea commit 8c4aa0d

File tree

4 files changed

+16
-353
lines changed

4 files changed

+16
-353
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def onCreate(self):
2222
main_screen = lv.obj()
2323
main_screen.set_style_border_width(0, 0)
2424
main_screen.set_style_radius(0, 0)
25-
main_screen.set_pos(0, mpos.ui.NOTIFICATION_BAR_HEIGHT) # leave some margin for the notification bar
25+
main_screen.set_pos(0, mpos.ui.topmenu.NOTIFICATION_BAR_HEIGHT) # leave some margin for the notification bar
2626
#main_screen.set_size(lv.pct(100), lv.pct(100))
2727
main_screen.set_style_pad_hor(mpos.ui.pct_of_display_width(2), 0)
28-
main_screen.set_style_pad_ver(mpos.ui.NOTIFICATION_BAR_HEIGHT, 0)
28+
main_screen.set_style_pad_ver(mpos.ui.topmenu.NOTIFICATION_BAR_HEIGHT, 0)
2929
main_screen.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
3030
self.setContentView(main_screen)
3131

internal_filesystem/lib/mpos/apps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def start_app(app_dir, is_launcher=False):
130130
execute_script(start_script_fullpath, True, app_dir + "/assets/", main_launcher_activity.get("classname"))
131131
# Launchers have the bar, other apps don't have it
132132
if is_launcher:
133-
mpos.ui.open_bar()
133+
mpos.ui.topmenu.open_bar()
134134
else:
135-
mpos.ui.close_bar()
135+
mpos.ui.topmenu.close_bar()
136136
end_time = utime.ticks_diff(utime.ticks_ms(), start_time)
137137
print(f"start_app() took {end_time}ms")
138138

0 commit comments

Comments
 (0)