diff --git a/crates/tek/src/core/color.rs b/crates/tek/src/core/color.rs index 93f086b6..519cb20a 100644 --- a/crates/tek/src/core/color.rs +++ b/crates/tek/src/core/color.rs @@ -24,9 +24,7 @@ pub struct ItemPalette { pub darker: ItemColor, pub darkest: ItemColor, } -/// Adds TUI RGB representation to an OKHSL value. from!(|okhsl: Okhsl|ItemColor = Self { okhsl, rgb: okhsl_to_rgb(okhsl) }); -/// Adds OKHSL representation to a TUI RGB value. from!(|rgb: Color|ItemColor = Self { rgb, okhsl: rgb_to_okhsl(rgb) }); // A single color within item theme parameters, in OKHSL and RGB representations. impl ItemColor { diff --git a/crates/tek/src/tui/app_arranger.rs b/crates/tek/src/tui/app_arranger.rs index 470a1391..70524722 100644 --- a/crates/tek/src/tui/app_arranger.rs +++ b/crates/tek/src/tui/app_arranger.rs @@ -64,12 +64,10 @@ render!(|self: ArrangerTui|{ let play = Fixed::wh(5, 2, PlayPause(self.clock.is_rolling())); let transport = TransportView::from((self, None, true)); let with_transport = |x|col!([row!(![&play, &transport]), &x]); - let with_pool = |x|Split::left(false, if self.show_pool { - self.splits[1] - } else { - 0 - }, PhraseListView(&self.phrases), x); - with_transport(with_pool(col!([ + let with_pool = |x|Split::left(false, + if self.show_pool { self.splits[1] } else { 0 }, + PhraseListView(&self.phrases), x); + with_pool(with_transport(col!([ &self.size, Fill::w(Fixed::h(20, arranger())), Fill::w(Fixed::h(25, &self.editor)), diff --git a/crates/tek/src/tui/arranger_mode_v.rs b/crates/tek/src/tui/arranger_mode_v.rs index f8d54086..0909b5b3 100644 --- a/crates/tek/src/tui/arranger_mode_v.rs +++ b/crates/tek/src/tui/arranger_mode_v.rs @@ -188,7 +188,7 @@ render!(|self: ArrangerVCursor|render(move|to: &mut TuiOutput|{ area }, }; - let bg = TuiTheme::border_bg(); + let bg = Color::Rgb(0, 255, 0); if let Some([x, y, width, height]) = track_area { to.fill_fg([x, y, 1, height], bg); to.fill_fg([x + width, y, 1, height], bg); diff --git a/crates/tek/src/tui/tui_border.rs b/crates/tek/src/tui/tui_border.rs index b7860f6d..14abf9f0 100644 --- a/crates/tek/src/tui/tui_border.rs +++ b/crates/tek/src/tui/tui_border.rs @@ -44,6 +44,12 @@ pub trait BorderStyle: Send + Sync + Copy { const S: &'static str = ""; const SW: &'static str = ""; const W: &'static str = ""; + + const N0: &'static str = ""; + const S0: &'static str = ""; + const W0: &'static str = ""; + const E0: &'static str = ""; + fn n (&self) -> &str { Self::N } fn s (&self) -> &str { Self::S } fn e (&self) -> &str { Self::E } @@ -67,30 +73,26 @@ pub trait BorderStyle: Send + Sync + Copy { let style = style.or_else(||self.style_horizontal()); let [x, x2, y, y2] = area.lrtb(); for x in x..x2.saturating_sub(1) { - self.draw_north(to, x, y, style); - self.draw_south(to, x, y2.saturating_sub(1), style); + to.blit(&Self::N, x, y, style); + to.blit(&Self::S, x, y2.saturating_sub(1), style) } Ok(area) } - #[inline] fn draw_north ( - &self, to: &mut TuiOutput, x: u16, y: u16, style: Option