diff --git a/avr/modules/lcd2/gui2/base/hlayout2.asm b/avr/modules/lcd2/gui2/base/hlayout2.asm index 1388f9c..db91c60 100644 --- a/avr/modules/lcd2/gui2/base/hlayout2.asm +++ b/avr/modules/lcd2/gui2/base/hlayout2.asm @@ -97,27 +97,15 @@ HLayout2_Init: ; @clobbers any, !Y HLayout2_OnLayout: - ; create layout context - bigcall OBJ_CountDirectChildren ; r16=num of children (r18, r19) - tst r16 - breq HLayout2_OnLayout_ret - push r16 - bigcall LayoutCtx_new ; X=new ctx (r16, r17, r18, r19, r24, r25) - pop r16 + ; create and preset context + rcall LayoutCtx_CreateContextFor1D brcc HLayout2_OnLayout_ret - ; set borders and spacing in layout context - bigcall Widget_GetBorderAndSpacing ; (none) - adiw xh:xl, LAYOUT_CTX_OFFS_BORDERS - st X+, r23 ; store border - st X, r22 ; store spacing - sbiw xh:xl, (LAYOUT_CTX_OFFS_BORDERS+1) ; do layout mov r25, r16 rcall hLayout2Horizontally rcall hLayout2Vertically ; release layout context bigcall LayoutCtx_free - ; force re-drawing of this widget, clear layout bit ldd r16, Y+OBJECT_OFFS_FLAGS sbr r16, (1<