fix: flatten arc widget main: style block to top-level properties

Root cause of the Home screen dial rendering tiny and pinned to the
top-left, confirmed via isolated test compile and direct inspection
of generated C++: an explicit main: sub-block on an LVGL arc widget
silently suppresses the implicit top-level MAIN-part style properties
(align, width, height, x, y) instead of merging with them. All three
arcs (dial_bg_arc, heat_arc, cool_arc) used a main: block for
arc_color/arc_width/arc_opa, which wiped out their align/width/height
in the exact same commit that set them (my earlier size/wrapper fix
never had a chance to take effect).

Verified via a standalone test config: an arc with main: nesting
generates zero lv_obj_set_style_width/height/align calls; the
identical arc with the same properties flattened to top-level
generates them correctly. indicator:/knob: are unaffected since those
are genuinely separate LVGL parts that require explicit nesting.
This commit is contained in:
pyr0ball 2026-07-12 10:21:51 -07:00
parent 1f750ea779
commit 60f133bfa3

View file

@ -86,9 +86,13 @@ lvgl:
max_value: 1
value: 0
adjustable: false
main:
arc_color: 0x444444
arc_width: 10
# 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:
arc_opa: transp
knob:
@ -105,8 +109,7 @@ lvgl:
max_value: 90
value: 70
adjustable: true
main:
arc_opa: transp
arc_opa: transp # flattened, see dial_bg_arc comment above
indicator:
arc_color: 0xFF3B30
arc_width: 10
@ -138,8 +141,7 @@ lvgl:
max_value: 90
value: 75
adjustable: true
main:
arc_opa: transp
arc_opa: transp # flattened, see dial_bg_arc comment above
indicator:
arc_color: 0x0A84FF
arc_width: 10