mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
launcher: leave some space for notification bar
This commit is contained in:
@@ -16,6 +16,7 @@ import lvgl as lv
|
|||||||
|
|
||||||
# Create a container for the grid
|
# Create a container for the grid
|
||||||
cont = lv.obj(appscreen)
|
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_size(lv.pct(100), lv.pct(100))
|
||||||
cont.set_style_pad_all(10, 0)
|
cont.set_style_pad_all(10, 0)
|
||||||
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
|
cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ COLOR_SLIDER_KNOB=DARKYELLOW
|
|||||||
COLOR_SLIDER_INDICATOR=LIGHTPINK
|
COLOR_SLIDER_INDICATOR=LIGHTPINK
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
drawer=None
|
drawer=None
|
||||||
wifi_screen=None
|
wifi_screen=None
|
||||||
drawer_open=False
|
drawer_open=False
|
||||||
@@ -322,6 +321,7 @@ def execute_script(script_source, is_file, is_launcher, is_graphical):
|
|||||||
lv.screen_load(newscreen)
|
lv.screen_load(newscreen)
|
||||||
script_globals = {
|
script_globals = {
|
||||||
'lv': lv,
|
'lv': lv,
|
||||||
|
'NOTIFICATION_BAR_HEIGHT': NOTIFICATION_BAR_HEIGHT, # for apps that want to leave space for notification bar
|
||||||
'appscreen': newscreen,
|
'appscreen': newscreen,
|
||||||
'start_app': start_app, # for launcher apps
|
'start_app': start_app, # for launcher apps
|
||||||
'parse_manifest': parse_manifest, # for launcher apps
|
'parse_manifest': parse_manifest, # for launcher apps
|
||||||
|
|||||||
Reference in New Issue
Block a user