feat: implement nested border-box layout and alignment

This commit is contained in:
2026-11-10 22:17:19 +08:00
parent 525097a0b2
commit 32d7ada3ab
21 changed files with 1368 additions and 74 deletions
+4 -1
View File
@@ -43,6 +43,7 @@ pub const TYPE_NAMES: &[&str] = &[
"Spacer",
"Row",
"Column",
"Overlay",
"Button",
"Page",
"Window",
@@ -143,6 +144,7 @@ enum Operation {
Scroll,
Row,
Column,
Overlay,
Button,
Page,
SetText,
@@ -186,7 +188,7 @@ impl Operation {
Rect => (2, 4),
MoveTab | MoveWindow | OpenValue | Spacer | SetText | SetColor | Append | Remove
| Render | Navigate | OnClick | Present => (1, 1),
Row | Column => (2, MAX_UI_NODES + 2),
Row | Column | Overlay => (2, MAX_UI_NODES + 2),
Button => (1, 1),
Insert | Replace | Move => (2, 2),
Page | Unmount | Close | Activate | Back | Forward | Children | NewWindow
@@ -425,6 +427,7 @@ fn new_typed_block(
Kind::Scroll { .. } => "ScrollBlock",
Kind::Row => "Row",
Kind::Column => "Column",
Kind::Overlay => "Overlay",
Kind::Button => "Button",
Kind::Page => "Page",
};