feat: add LVGL base config with persistent bottom nav bar
This commit is contained in:
parent
90d710e41c
commit
88042cf850
1 changed files with 74 additions and 7 deletions
|
|
@ -37,11 +37,78 @@ display:
|
||||||
number: 6 # EXIO6 = LCD_VDD_EN (VCOM enable) — the built-in preset doesn't set
|
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, but the Waveshare wiki confirms VCOM must be driven high on
|
||||||
# this board or the panel won't display correctly. Added explicitly.
|
# 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:
|
lvgl:
|
||||||
- file: "gfonts://Roboto"
|
id: lvgl_comp
|
||||||
id: font_label
|
displays:
|
||||||
size: 32
|
- 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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue