From 454a00a89c8339d046b262425dc20826e81ceea1 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Mon, 5 May 2025 22:10:15 +0200 Subject: [PATCH] launcher: leave some space for notification bar --- .../builtin/apps/com.example.launcher/assets/launcher.py | 1 + internal_filesystem/main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py b/internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py index c3236927..e1b30072 100644 --- a/internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py +++ b/internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py @@ -16,6 +16,7 @@ import lvgl as lv # Create a container for the grid cont = lv.obj(appscreen) +cont.set_pos(0, NOTIFICATION_BAR_HEIGHT) # leave some margin for the notification bar cont.set_size(lv.pct(100), lv.pct(100)) cont.set_style_pad_all(10, 0) cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) diff --git a/internal_filesystem/main.py b/internal_filesystem/main.py index f93791e1..823d8fbd 100644 --- a/internal_filesystem/main.py +++ b/internal_filesystem/main.py @@ -41,7 +41,6 @@ COLOR_SLIDER_KNOB=DARKYELLOW COLOR_SLIDER_INDICATOR=LIGHTPINK - drawer=None wifi_screen=None drawer_open=False @@ -322,6 +321,7 @@ def execute_script(script_source, is_file, is_launcher, is_graphical): lv.screen_load(newscreen) script_globals = { 'lv': lv, + 'NOTIFICATION_BAR_HEIGHT': NOTIFICATION_BAR_HEIGHT, # for apps that want to leave space for notification bar 'appscreen': newscreen, 'start_app': start_app, # for launcher apps 'parse_manifest': parse_manifest, # for launcher apps