gui2: fixed problems with layouts

need to look into spread mode, too.
This commit is contained in:
Martin Preuss
2026-03-11 00:32:08 +01:00
parent 282cd738b4
commit 51cedae0cb
10 changed files with 493 additions and 84 deletions

View File

@@ -69,6 +69,7 @@ MainWindow_Init:
push r20
push r21
; call base class
ldi r20, VLAYOUT_MODE_EXPAND
bigcall VLayout_Init ; (r16, r17, X)
pop r21
pop r20
@@ -86,6 +87,8 @@ MainWindow_Init:
ldi r16, HIGH(MainWindow_DefaultStyle*2)
std Y+WIDGET_OFFS_STYLE_HI, r16
bigcall Widget_SetFullScreen ; (R16)
; create sub widgets
rcall mainWindowCreateTitleWidget
rcall mainWindowCreateContentWidget
@@ -202,6 +205,7 @@ mainWindowCreateContentWidget:
mov xh, yh
ldi r16, 0 ; OPTS
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_FILLED<<WIDGET_PACK_VSELF0_BIT) ; PACK
ldi r20, VLAYOUT_MODE_EXPAND
bigcall VLayout_new
brcc mainWindowCreateContentWidget_done
; set style for title widget
@@ -282,7 +286,7 @@ MainWindow_ContentStyle:
.dw DISPLAY_COLOR_BLACK ; borderCol_activated
.dw DISPLAY_COLOR_WHITE ; shadowCol_activated
.db 2, 2 ; outerBorderSize, innerBorderSize
.db 1, 1 ; outerBorderSize, innerBorderSize
.dw ili9341Font12x16_1*2 ; font
.db 12, 16 ; charWidth, charHeight