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

@ -2,7 +2,7 @@ use crate::*;
impl Widget for Plugin<Tui> {
type Engine = Tui;
fn layout (&self, to: [u16;4]) -> Perhaps<[u16;4]> {
fn layout (&self, to: [u16;2]) -> Perhaps<[u16;2]> {
Ok(Some(to))
}
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {

View file

@ -31,7 +31,7 @@ impl Exit for AddSampleModal {
impl Widget for AddSampleModal {
type Engine = Tui;
fn layout (&self, to: [u16;4]) -> Perhaps<[u16;4]> {
fn layout (&self, to: [u16;2]) -> Perhaps<[u16;2]> {
todo!()
//Align::Center(()).layout(to)
}

View file

@ -2,7 +2,7 @@ use crate::*;
impl Widget for Sampler {
type Engine = Tui;
fn layout (&self, to: [u16;4]) -> Perhaps<[u16;4]> {
fn layout (&self, to: [u16;2]) -> Perhaps<[u16;2]> {
todo!()
}
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {

View file

@ -33,7 +33,7 @@ pub struct TrackView<'a, E: Engine> {
}
impl<'a> Widget for TrackView<'a, Tui> {
type Engine = Tui;
fn layout (&self, area: [u16;4]) -> Perhaps<[u16;4]> {
fn layout (&self, area: [u16;2]) -> Perhaps<[u16;2]> {
todo!()
}
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {