use X/Y instead of W/H in layout widgets

- also core is <2000LoC now yay!
- also using more methods and fewer conditionals
This commit is contained in:
🪞👃🪞 2024-09-12 20:54:47 +03:00
parent 4b19abd98a
commit 02db343574
2 changed files with 81 additions and 139 deletions

View file

@ -506,7 +506,7 @@ impl<'a> Content for TracksHeader<'a> {
let Self(_offset, columns, tracks) = *self;
Split::right(move |add|{
for (track, (w, _)) in tracks.iter().zip(columns) {
add(&Min::W(*w as u16, Layers::new(|add|{
add(&Min::X(*w as u16, Layers::new(|add|{
add(&FillBg(COLOR_BG1))?;
add(&track.name.read().unwrap().as_str())
})))?;