raphlinus / crochet

Explorations in reactive UI patterns
Apache License 2.0
367 stars 21 forks source link

Add SizedBox and Painter widgets. #23

Closed luleyleo closed 3 years ago

luleyleo commented 3 years ago

I wanted to add the Painter widget, but in order to use it I needed SizedBox (Painter uses bc.max()).

I've also added a new trait MutableWidget which extends druid::Widget<DruidAppData> with the mutate method. This was required for Painter because I wanted Painter to be generic over its painting data. If it works out well, I might be able to use this for all widgets and remove AnyWidget? I'll have to play around with it a bit more.