fix(container): rendering scrollable elements with separators
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 23s

Added corresponding test cases to test the corresponding rendering of
scrollable elements.
This commit is contained in:
2025-02-27 17:02:16 +01:00
parent 53b69f034c
commit 3b6848f845
7 changed files with 167 additions and 4 deletions

View File

@@ -346,8 +346,8 @@ pub const Layout = packed struct {
for (0..children.len - 1) |idx| {
const child = children[idx];
const anchor = switch (this.direction) {
.horizontal => (child.size.anchor.row * size.cols) + child.size.anchor.col + child.size.cols + gap,
.vertical => ((child.size.anchor.row + child.size.rows + gap) * size.cols) + child.size.anchor.col,
.horizontal => ((child.size.anchor.row -| size.anchor.row) * size.cols) + child.size.anchor.col + child.size.cols + gap -| size.anchor.col,
.vertical => ((child.size.anchor.row + child.size.rows + gap -| size.anchor.row) * size.cols) + child.size.anchor.col -| size.anchor.col,
};
switch (this.direction) {