mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-24 09:05:43 +00:00
GridLayout: make rowspacing and colspacing available even when implicit
This commit is contained in:
parent
ba89ae53b8
commit
e698e6360b
2 changed files with 5 additions and 3 deletions
|
|
@ -184,6 +184,8 @@ pub fn initialize(elem: &ElementRc, name: &str) -> Option<Expression> {
|
||||||
"preferred-width" => layout_constraint_prop(elem, "preferred", Orientation::Horizontal),
|
"preferred-width" => layout_constraint_prop(elem, "preferred", Orientation::Horizontal),
|
||||||
"opacity" => Expression::NumberLiteral(1., Unit::None),
|
"opacity" => Expression::NumberLiteral(1., Unit::None),
|
||||||
"visible" => Expression::BoolLiteral(true),
|
"visible" => Expression::BoolLiteral(true),
|
||||||
|
"rowspan" => Expression::NumberLiteral(1., Unit::None),
|
||||||
|
"colspan" => Expression::NumberLiteral(1., Unit::None),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
Some(expr)
|
Some(expr)
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,10 @@ export component TestCase inherits Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
out property <bool> test: {
|
out property <bool> test: {
|
||||||
rr.x == 50phx && rr.y == 50phx && rr.width == 30phx && rr.height == (200phx - 10phx) / 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 &&
|
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 &&
|
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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue