SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
222 stars 18 forks source link

Add Divider widget #135

Closed Uriopass closed 6 months ago

Uriopass commented 6 months ago

The props are taken from Flutter's Divider

We find out the parent's width during the paint phase since Divider doesn't have children so that it is more versatile.

That is, it can be laid out in infinite constraints and will still be as wide as the parent.

I have not found a way to make Divider "smart" so that it knows if it should be vertical or horizontal based on the layout. That might not make sense anyway.

Part of #75

LPGhatguy commented 6 months ago

@kanerogers you'd probably be interested in this widget since you ran into constraint sizing issues in Clipper

kanerogers commented 6 months ago

Sweet! Will give this a try when I get back home