gui2: resize item if WIDGET_PACK_FILLED
This commit is contained in:
@@ -380,6 +380,8 @@ layoutCtxPack:
|
|||||||
breq layoutCtxPack_end
|
breq layoutCtxPack_end
|
||||||
cpi r25, WIDGET_PACK_CENTER
|
cpi r25, WIDGET_PACK_CENTER
|
||||||
breq layoutCtxPack_center
|
breq layoutCtxPack_center
|
||||||
|
cpi r25, WIDGET_PACK_FILLED
|
||||||
|
breq layoutCtxPack_filled
|
||||||
rjmp layoutCtxPack_store
|
rjmp layoutCtxPack_store
|
||||||
layoutCtxPack_end:
|
layoutCtxPack_end:
|
||||||
add r18, r16 ; just add difference to pos
|
add r18, r16 ; just add difference to pos
|
||||||
@@ -390,6 +392,14 @@ layoutCtxPack_center:
|
|||||||
ror r16
|
ror r16
|
||||||
add r18, r16 ; just add half difference to pos
|
add r18, r16 ; just add half difference to pos
|
||||||
adc r19, r17
|
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:
|
layoutCtxPack_store:
|
||||||
adiw xh:xl, LAYOUT_CTX_ITEM_OFFS_POS_LO
|
adiw xh:xl, LAYOUT_CTX_ITEM_OFFS_POS_LO
|
||||||
st X+, r18
|
st X+, r18
|
||||||
|
|||||||
Reference in New Issue
Block a user