From 092c6672917fd3943f20c244a43c09b406e67cec Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Wed, 11 Mar 2026 19:53:19 +0100 Subject: [PATCH] gui2: fixed more bugs in layout code. Now basically works! --- avr/devices/c03/test/main.asm | 18 +++- avr/devices/c03/test/ressources.asm | 2 +- avr/devices/c03/test/w_climate.asm | 20 +--- avr/modules/lcd2/gui2/aqhome/sensorwatch.asm | 7 +- avr/modules/lcd2/gui2/base/hlayout.asm | 96 ++++++++++++-------- avr/modules/lcd2/gui2/base/layout.asm | 5 - avr/modules/lcd2/gui2/base/mainwindow.asm | 2 +- avr/modules/lcd2/gui2/base/valuelabel.asm | 3 +- avr/modules/lcd2/gui2/base/vlayout.asm | 4 +- avr/modules/lcd2/gui2/base/widget.asm | 1 + 10 files changed, 90 insertions(+), 68 deletions(-) diff --git a/avr/devices/c03/test/main.asm b/avr/devices/c03/test/main.asm index c467e5a..f2d9914 100644 --- a/avr/devices/c03/test/main.asm +++ b/avr/devices/c03/test/main.asm @@ -288,7 +288,6 @@ test: ; ldi r16, HIGH(Debug_Style*2) ; std Y+WIDGET_OFFS_STYLE_HI, r16 - DEBUG_STOP: bigjmp DEBUG1 @@ -301,6 +300,23 @@ DEBUG_STOP3: +Debug_Style: + .dw DISPLAY_COLOR_BLACK ; frontCol_norm + .dw DISPLAY_COLOR_GREEN ; backCol_norm + .dw DISPLAY_COLOR_BLACK ; borderCol_norm + .dw DISPLAY_COLOR_WHITE ; shadowCol_norm + + .dw DISPLAY_COLOR_WHITE ; frontCol_activated + .dw DISPLAY_COLOR_NAVY ; backCol_activated + .dw DISPLAY_COLOR_BLACK ; borderCol_activated + .dw DISPLAY_COLOR_WHITE ; shadowCol_activated + + .db 2, 1 ; outerBorderSize, innerBorderSize + .dw ili9341Font12x16_1*2 ; font + .db 12, 16 ; charWidth, charHeight + + + mkTestWindow: bigcall GuiApp_GetRootWindow brcc mkTestWindow_ret diff --git a/avr/devices/c03/test/ressources.asm b/avr/devices/c03/test/ressources.asm index b898180..6b3ef0b 100644 --- a/avr/devices/c03/test/ressources.asm +++ b/avr/devices/c03/test/ressources.asm @@ -1034,7 +1034,7 @@ resTextTemp_s: .db "Temp", 0, 0 resTextHum_s: - .db "Feuchte", 0 + .db "Luft", 0, 0 resTextUnknown_s: .db "???", 0 diff --git a/avr/devices/c03/test/w_climate.asm b/avr/devices/c03/test/w_climate.asm index 1fa113d..23e91d7 100644 --- a/avr/devices/c03/test/w_climate.asm +++ b/avr/devices/c03/test/w_climate.asm @@ -81,28 +81,18 @@ ClimateWin_new_ret: climateWinCreateSensorWatches: ldi r16, 0 ; OPTS ldi r17, (WIDGET_PACK_FILLED<between->end) - mov r22, r16 - push r22 - ldi r22, (1<between->end) + mov r22, r16 + push r22 + ldi r22, (1<