some minor work on gui/win modules.

This commit is contained in:
Martin Preuss
2025-06-12 23:30:36 +02:00
parent c51043d72a
commit ffcc5c0d9f
7 changed files with 82 additions and 8 deletions

View File

@@ -160,11 +160,11 @@ wVLayout:
rcall wSetChildrenHeightsFromMinHeights
; count number of expandable children
ldi r16, WID_OPTIONS1_BIT_STRETCH_Y
ldi r17, WID_OPTIONS1_BIT_STRETCH_Y
rcall widgetCountVisibleChildrenWithOptions1 ; (r18, r24, r25, X)
ldi r16, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; value
ldi r17, (1<<WID_OPTIONS1_BIT_STRETCH_Y) ; mask
rcall widgetCountVisibleChildrenWithOptions1 ; r18=number of matching visible children (r24, r25, X)
tst r18
breq wVLayout_Ydone ; no expandable children, nothing to distribute
breq wVLayout_Ydone ; no expandable children, nothing to distribute
; determine full height needed by all children
push r18 ; number of visible expandable child widgets
clr r17 ; mask=0 -> count all visible children
@@ -187,7 +187,7 @@ wVLayout:
sub r20, r18 ; r21:r20 = HEIGHT-SUM_OF_VIS_CHILDREN_HEIGHTS
sbc r21, r19
brcc wVLayout_heightTooSmall
breq wVLayout_yDone ; nothing to distribute
breq wVLayout_yDone ; nothing to distribute
bigcall Utils_Divu16_16_16 ; r17:r16 = r21:r20 / r23:r22
; add additional pixel to heights of expandable child widgets
rcall wAddToHeightsOfExpandableVisibleChildren