Skip to content

Commit 454a00a

Browse files
launcher: leave some space for notification bar
1 parent e2e94b4 commit 454a00a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# Create a container for the grid
1818
cont = lv.obj(appscreen)
19+
cont.set_pos(0, NOTIFICATION_BAR_HEIGHT) # leave some margin for the notification bar
1920
cont.set_size(lv.pct(100), lv.pct(100))
2021
cont.set_style_pad_all(10, 0)
2122
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)

internal_filesystem/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
COLOR_SLIDER_INDICATOR=LIGHTPINK
4242

4343

44-
4544
drawer=None
4645
wifi_screen=None
4746
drawer_open=False
@@ -322,6 +321,7 @@ def execute_script(script_source, is_file, is_launcher, is_graphical):
322321
lv.screen_load(newscreen)
323322
script_globals = {
324323
'lv': lv,
324+
'NOTIFICATION_BAR_HEIGHT': NOTIFICATION_BAR_HEIGHT, # for apps that want to leave space for notification bar
325325
'appscreen': newscreen,
326326
'start_app': start_app, # for launcher apps
327327
'parse_manifest': parse_manifest, # for launcher apps

0 commit comments

Comments
 (0)