change Layout to output minimum size (breaks Align::Center?)

This commit is contained in:
🪞👃🪞 2024-09-15 01:31:26 +03:00
parent 0737769232
commit 1a0e06dc66
13 changed files with 232 additions and 162 deletions

View file

@ -24,7 +24,7 @@ struct TestArea(u16, u16);
impl Widget for TestArea {
type Engine = TestEngine;
fn layout (&self, to: [u16;4]) -> Perhaps<[u16;4]> {
fn layout (&self, to: [u16;2]) -> Perhaps<[u16;2]> {
Ok(Some([to[0], to[1], self.0, self.1]))
}
fn render (&self, to: &mut Self::Engine) -> Perhaps<[u16;4]> {