new rendering engine

This commit is contained in:
2026-06-19 02:55:33 +02:00
parent 0a90d6a5d7
commit 81a4167382
53 changed files with 1668 additions and 378 deletions

View File

@@ -1,5 +1,5 @@
use client_domain::{BoundingBox, LayoutEngine};
use domain::{ContainerNode, Direction, LayoutChild, LayoutNode, Sizing};
use domain::{AlignItems, ContainerNode, Direction, JustifyContent, LayoutChild, LayoutNode, Sizing};
fn screen() -> BoundingBox {
BoundingBox::screen(240, 320)
@@ -11,6 +11,8 @@ fn diff_detects_moved_widget_after_layout_change() {
direction: Direction::Row,
gap: 0,
padding: 0,
justify_content: JustifyContent::Start,
align_items: AlignItems::Stretch,
children: vec![
LayoutChild {
sizing: Sizing::Flex(1),
@@ -27,6 +29,8 @@ fn diff_detects_moved_widget_after_layout_change() {
direction: Direction::Column,
gap: 0,
padding: 0,
justify_content: JustifyContent::Start,
align_items: AlignItems::Stretch,
children: vec![
LayoutChild {
sizing: Sizing::Flex(1),
@@ -53,6 +57,8 @@ fn diff_returns_empty_for_identical_layouts() {
direction: Direction::Row,
gap: 0,
padding: 0,
justify_content: JustifyContent::Start,
align_items: AlignItems::Stretch,
children: vec![
LayoutChild {
sizing: Sizing::Flex(1),
@@ -77,6 +83,8 @@ fn diff_detects_added_and_removed_widgets() {
direction: Direction::Row,
gap: 0,
padding: 0,
justify_content: JustifyContent::Start,
align_items: AlignItems::Stretch,
children: vec![LayoutChild {
sizing: Sizing::Flex(1),
node: LayoutNode::Leaf(1),
@@ -87,6 +95,8 @@ fn diff_detects_added_and_removed_widgets() {
direction: Direction::Row,
gap: 0,
padding: 0,
justify_content: JustifyContent::Start,
align_items: AlignItems::Stretch,
children: vec![LayoutChild {
sizing: Sizing::Flex(1),
node: LayoutNode::Leaf(2),