feat: reshape classic+ Home screen into quick-actions/dial/weather columns
This commit is contained in:
parent
5c948377d5
commit
72843b31e4
1 changed files with 125 additions and 59 deletions
|
|
@ -94,6 +94,103 @@ lvgl:
|
|||
y: 20
|
||||
text: "Firecrest"
|
||||
text_font: montserrat_16
|
||||
- obj:
|
||||
id: quick_actions_rail
|
||||
align: top_left
|
||||
x: 16
|
||||
y: 90px
|
||||
width: 190px
|
||||
height: size_content
|
||||
pad_all: 8
|
||||
border_width: 0
|
||||
outline_width: 0
|
||||
scrollable: false
|
||||
bg_opa: transp
|
||||
clickable: false
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: column
|
||||
flex_align_cross: stretch
|
||||
flex_align_track: start
|
||||
flex_align_main: start
|
||||
widgets:
|
||||
- button:
|
||||
height: 60px
|
||||
margin_bottom: 12
|
||||
on_click:
|
||||
climate.control:
|
||||
id: main_thermostat
|
||||
preset: home
|
||||
widgets:
|
||||
- label:
|
||||
align: center
|
||||
text: "Home"
|
||||
text_font: montserrat_20
|
||||
- button:
|
||||
height: 60px
|
||||
margin_bottom: 12
|
||||
on_click:
|
||||
climate.control:
|
||||
id: main_thermostat
|
||||
preset: away
|
||||
widgets:
|
||||
- label:
|
||||
align: center
|
||||
text: "Away"
|
||||
text_font: montserrat_20
|
||||
- button:
|
||||
height: 60px
|
||||
on_click:
|
||||
switch.toggle: relay_fan
|
||||
widgets:
|
||||
- label:
|
||||
align: center
|
||||
text: "Fan"
|
||||
text_font: montserrat_20
|
||||
- obj:
|
||||
id: weather_rail
|
||||
align: top_right
|
||||
x: -16
|
||||
y: 70px
|
||||
width: 240px
|
||||
height: size_content
|
||||
pad_all: 16
|
||||
border_width: 0
|
||||
outline_width: 0
|
||||
scrollable: false
|
||||
bg_opa: transp
|
||||
clickable: false
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: column
|
||||
flex_align_cross: center
|
||||
flex_align_track: start
|
||||
flex_align_main: start
|
||||
widgets:
|
||||
- label:
|
||||
id: status_condition_label
|
||||
text: "--"
|
||||
text_font: montserrat_32
|
||||
- label:
|
||||
id: status_temp_label
|
||||
text: "Outside: -- °F"
|
||||
text_font: montserrat_24
|
||||
- label:
|
||||
id: status_humidity_label
|
||||
text: "Humidity: -- %"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_high_label
|
||||
text: "High: -- °F"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_low_label
|
||||
text: "Low: -- °F"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_precip_label
|
||||
text: "Precipitation: -- %"
|
||||
text_font: montserrat_20
|
||||
- obj:
|
||||
id: temp_view
|
||||
width: 100%
|
||||
|
|
@ -103,12 +200,6 @@ lvgl:
|
|||
outline_width: 0
|
||||
scrollable: false
|
||||
bg_opa: transp
|
||||
# LVGL's base obj is clickable by default (obj->flags = LV_OBJ_FLAG_CLICKABLE in
|
||||
# lv_obj_create) and lv_obj_hit_test() requires that flag before checking geometry.
|
||||
# Being a full-screen, topmost sibling of mode_toggle, this container was silently
|
||||
# swallowing every tap over the toggle bar (no on_click, so nothing visibly happened)
|
||||
# before the touch search could reach mode_toggle underneath — same z-order class of
|
||||
# bug as the bg_opa fix above, but for touch capture instead of rendering.
|
||||
clickable: false
|
||||
widgets:
|
||||
- arc:
|
||||
|
|
@ -123,11 +214,6 @@ lvgl:
|
|||
max_value: 1
|
||||
value: 0
|
||||
adjustable: false
|
||||
# arc_color/arc_width are flattened to top-level (MAIN part) rather than nested
|
||||
# under a "main:" key — an explicit "main:" sub-block silently suppresses the
|
||||
# implicit top-level MAIN-part properties (align/width/height/x/y), verified via
|
||||
# isolated test compile. indicator:/knob: below are unaffected since those are
|
||||
# genuinely separate, non-MAIN parts that require nesting.
|
||||
arc_color: 0x444444
|
||||
arc_width: 10
|
||||
indicator:
|
||||
|
|
@ -146,13 +232,8 @@ lvgl:
|
|||
max_value: 90
|
||||
value: 70
|
||||
adjustable: true
|
||||
adv_hittest: true # LVGL's default touch hit-test just uses each widget's full
|
||||
# bounding square (any topmost widget under the touch point
|
||||
# wins), which is why the radius difference alone didn't fix
|
||||
# touch disambiguation. adv_hittest switches to LVGL's precise
|
||||
# ring-based hit test (see LV_EVENT_HIT_TEST in lv_arc.c),
|
||||
# which actually respects each arc's own radius.
|
||||
arc_opa: transp # flattened, see dial_bg_arc comment above
|
||||
adv_hittest: true
|
||||
arc_opa: transp
|
||||
indicator:
|
||||
arc_color: 0xFF3B30
|
||||
arc_width: 10
|
||||
|
|
@ -172,13 +253,8 @@ lvgl:
|
|||
id: cool_arc
|
||||
align: center
|
||||
y: -20
|
||||
width: 360px # smaller radius than heat_arc (400px) so the two rings are physically
|
||||
height: 360px # distinct. LVGL's adv_hittest arc hit test only accepts touches within
|
||||
# the arc's own ring band (radius - arc_width to radius, in its angular
|
||||
# span) — confirmed via lv_arc.c LV_EVENT_HIT_TEST. Same-radius arcs
|
||||
# occupy an identical ring band, so adv_hittest alone CANNOT disambiguate
|
||||
# them (verified on hardware: making both 400px left only the topmost,
|
||||
# cool_arc, draggable). Differing radii are required, not optional.
|
||||
width: 360px # MUST stay smaller than heat_arc's 400px — see Global Constraints
|
||||
height: 360px
|
||||
start_angle: 315
|
||||
end_angle: 225
|
||||
mode: REVERSE
|
||||
|
|
@ -186,8 +262,8 @@ lvgl:
|
|||
max_value: 90
|
||||
value: 75
|
||||
adjustable: true
|
||||
adv_hittest: true # see heat_arc comment above — precise ring-based hit test
|
||||
arc_opa: transp # flattened, see dial_bg_arc comment above
|
||||
adv_hittest: true
|
||||
arc_opa: transp
|
||||
indicator:
|
||||
arc_color: 0x0A84FF
|
||||
arc_width: 10
|
||||
|
|
@ -228,23 +304,6 @@ lvgl:
|
|||
id: home_temp_label
|
||||
text: "-- °F"
|
||||
text_font: montserrat_48
|
||||
- button:
|
||||
align: bottom_left
|
||||
x: 24
|
||||
y: -24
|
||||
width: 90px
|
||||
height: 90px
|
||||
radius: 45
|
||||
on_click:
|
||||
climate.control:
|
||||
id: main_thermostat
|
||||
preset: away
|
||||
widgets:
|
||||
- label:
|
||||
align: center
|
||||
y: -10
|
||||
text: "Away"
|
||||
text_font: montserrat_16
|
||||
- button:
|
||||
align: bottom_mid
|
||||
x: -110
|
||||
|
|
@ -288,7 +347,7 @@ lvgl:
|
|||
outline_width: 0
|
||||
scrollable: false
|
||||
bg_opa: transp
|
||||
clickable: false # see temp_view comment above — same touch-capture fix
|
||||
clickable: false
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: column
|
||||
|
|
@ -297,28 +356,35 @@ lvgl:
|
|||
flex_align_main: space_evenly
|
||||
widgets:
|
||||
- label:
|
||||
id: status_condition_label
|
||||
text: "--"
|
||||
text: "System Status"
|
||||
text_font: montserrat_32
|
||||
- label:
|
||||
id: status_temp_label
|
||||
text: "Outside: -- °F"
|
||||
text_font: montserrat_24
|
||||
- label:
|
||||
id: status_humidity_label
|
||||
text: "Humidity: -- %"
|
||||
id: status_relay_fan_label
|
||||
text: "Fan: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_high_label
|
||||
text: "High: -- °F"
|
||||
id: status_relay_cool1_label
|
||||
text: "Cool Stage 1: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_low_label
|
||||
text: "Low: -- °F"
|
||||
id: status_relay_cool2_label
|
||||
text: "Cool Stage 2: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_precip_label
|
||||
text: "Precipitation: -- %"
|
||||
id: status_relay_heat1_label
|
||||
text: "Heat Stage 1: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_relay_heat2_label
|
||||
text: "Heat Stage 2: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_uptime_label
|
||||
text: "Uptime: -- min"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: status_ip_label
|
||||
text: "IP: --"
|
||||
text_font: montserrat_20
|
||||
- id: page_sensors
|
||||
widgets:
|
||||
|
|
|
|||
Loading…
Reference in a new issue