feat: add LVGL base config with persistent bottom nav bar

This commit is contained in:
pyr0ball 2026-07-11 22:35:26 -07:00
parent 90d710e41c
commit 88042cf850

View file

@ -37,11 +37,78 @@ display:
number: 6 # EXIO6 = LCD_VDD_EN (VCOM enable) — the built-in preset doesn't set
# this, but the Waveshare wiki confirms VCOM must be driven high on
# this board or the panel won't display correctly. Added explicitly.
lambda: |-
it.fill(Color::BLACK);
it.print(512, 300, id(font_label), TextAlign::CENTER, "Thermostat — Phase 1 OK");
font:
- file: "gfonts://Roboto"
id: font_label
size: 32
lvgl:
id: lvgl_comp
displays:
- lcd_display
touchscreens:
- touch_gt911
pages:
- id: page_home
widgets: []
- id: page_sensors
widgets: []
- id: page_settings
widgets: []
- id: page_schedule
widgets: []
top_layer:
widgets:
- obj:
id: nav_bar
align: bottom_mid
width: 100%
height: 90px
pad_all: 4
radius: 0
border_width: 0
outline_width: 0
scrollable: false
layout:
type: flex
flex_flow: row
flex_align_cross: center
flex_align_track: center
flex_align_main: space_evenly
widgets:
- button:
id: nav_btn_home
width: 220px
height: 78px
on_click:
lvgl.page.show: page_home
widgets:
- label:
text: "Home"
text_font: montserrat_20
- button:
id: nav_btn_sensors
width: 220px
height: 78px
on_click:
lvgl.page.show: page_sensors
widgets:
- label:
text: "Sensors"
text_font: montserrat_20
- button:
id: nav_btn_settings
width: 220px
height: 78px
on_click:
lvgl.page.show: page_settings
widgets:
- label:
text: "Settings"
text_font: montserrat_20
- button:
id: nav_btn_schedule
width: 220px
height: 78px
on_click:
lvgl.page.show: page_schedule
widgets:
- label:
text: "Schedule"
text_font: montserrat_20