diff --git a/internal/compiler/passes/materialize_fake_properties.rs b/internal/compiler/passes/materialize_fake_properties.rs index 8b0b6e026..d75615f42 100644 --- a/internal/compiler/passes/materialize_fake_properties.rs +++ b/internal/compiler/passes/materialize_fake_properties.rs @@ -184,6 +184,8 @@ pub fn initialize(elem: &ElementRc, name: &str) -> Option { "preferred-width" => layout_constraint_prop(elem, "preferred", Orientation::Horizontal), "opacity" => Expression::NumberLiteral(1., Unit::None), "visible" => Expression::BoolLiteral(true), + "rowspan" => Expression::NumberLiteral(1., Unit::None), + "colspan" => Expression::NumberLiteral(1., Unit::None), _ => return None, }; Some(expr) diff --git a/tests/cases/layout/grid_span.slint b/tests/cases/layout/grid_span.slint index f04a5fbd7..18d2a6feb 100644 --- a/tests/cases/layout/grid_span.slint +++ b/tests/cases/layout/grid_span.slint @@ -51,10 +51,10 @@ export component TestCase inherits Window { } out property test: { - rr.x == 50phx && rr.y == 50phx && rr.width == 30phx && rr.height == (200phx - 10phx) / 2 && - rb.width == 40phx && rg.width == 20phx && rg.height == (400phx - 200phx - 100phx - 20phx) / 2 && + rr.x == 50phx && rr.y == 50phx && rr.width == 30phx && rr.height == (200phx - 10phx) / 2 && rr.colspan == 2 && + rb.width == 40phx && rg.width == 20phx && rg.height == (400phx - 200phx - 100phx - 20phx) / 2 && rg.colspan == 1 && zero.height == 0 && zero.width == rb.width && zero.x == rb.x && zero.y == rg.y && - zero2.height == rg.height && zero2.width == 0 && zero2.x > rb.x && zero2.y == rg.y + zero2.height == rg.height && zero2.width == 0 && zero2.x > rb.x && zero2.y == rg.y && zero2.rowspan == 1 && zero2.colspan == 0 }