diff --git a/avr/modules/lcd2/gui2/base/layout2.asm b/avr/modules/lcd2/gui2/base/layout2.asm index 8aff530..82241bb 100644 --- a/avr/modules/lcd2/gui2/base/layout2.asm +++ b/avr/modules/lcd2/gui2/base/layout2.asm @@ -380,6 +380,8 @@ layoutCtxPack: breq layoutCtxPack_end cpi r25, WIDGET_PACK_CENTER breq layoutCtxPack_center + cpi r25, WIDGET_PACK_FILLED + breq layoutCtxPack_filled rjmp layoutCtxPack_store layoutCtxPack_end: add r18, r16 ; just add difference to pos @@ -390,6 +392,14 @@ layoutCtxPack_center: ror r16 add r18, r16 ; just add half difference to pos adc r19, r17 + rjmp layoutCtxPack_store +layoutCtxPack_filled: + add r16, r20 ; get size back into r17:r16 + adc r17, r21 + adiw xh:xl, LAYOUT_CTX_ITEM_OFFS_SIZE_LO + st X+, r16 ; set item to full size + st X, r17 + sbiw xh:xl, (LAYOUT_CTX_ITEM_OFFS_SIZE_LO+1) layoutCtxPack_store: adiw xh:xl, LAYOUT_CTX_ITEM_OFFS_POS_LO st X+, r18