vaxis
created pr with
51.1
cmds
checkout latest patchset:
ssh pr.pico.sh print 51 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 51.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 51
Patchset
51.1
vxfw(List): add `Gap` between list items
Eric Bower
2025-03-12T17:27:43ZSemantic diff summary
0 added,
3 modified,
0 signature changed,
0 removed
across 2 analyzed files
+1
-0
_examples/vxfw/list/main.go
#
+5
-2
vxfw/list/list.go
#
| ... | ... | @@ -180,7 +183,7 @@ func (d *Dynamic) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) { | |
| 180 | 183 | s.AddChild(colOffset, ah, chS) | |
| 181 | 184 | ||
| 182 | 185 | // Add our height to accumulated height | |
| 183 | - | ah += int(chS.Size.Height) | |
| 186 | + | ah += int(chS.Size.Height) + d.Gap | |
| 184 | 187 | ||
| 185 | 188 | // If we need to draw the cursor, keep going | |
| 186 | 189 | if d.scroll.wantsCursor && i <= d.cursor { |
| ... | ... | @@ -194,7 +197,7 @@ func (d *Dynamic) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) { | |
| 194 | 197 | ||
| 195 | 198 | var totalHeight uint16 | |
| 196 | 199 | for _, ch := range s.Children { | |
| 197 | - | totalHeight += ch.Surface.Size.Height | |
| 200 | + | totalHeight += ch.Surface.Size.Height + uint16(d.Gap) | |
| 198 | 201 | } | |
| 199 | 202 | ||
| 200 | 203 | if d.DrawCursor { |