nicer scrollbar and status bar

This commit is contained in:
🪞👃🪞 2025-01-28 16:34:15 +01:00
parent 0243e24614
commit 357efeea3e
3 changed files with 8 additions and 9 deletions

View file

@ -29,7 +29,7 @@ impl Selection {
match self { Clip(_, s) => Some(*s), Scene(s) => Some(*s), _ => None }
}
pub fn describe (&self, tracks: &[Track], scenes: &[Scene]) -> Arc<str> {
format!("Selected: {}", match self {
format!("{}", match self {
Self::Mix => "Everything".to_string(),
Self::Track(t) => tracks.get(*t).map(|track|format!("T{t}: {}", &track.name))
.unwrap_or_else(||"T??".into()),

View file

@ -64,7 +64,7 @@ impl Tek {
let theme = ItemPalette::G[96];
let fmtd = self.fmtd.read().unwrap();
Tui::bg(Black, row!(Bsp::a(
Fill::xy(Align::w(FieldH(theme, "Sel", self.selected.describe(&self.tracks, &self.scenes)))),
Fill::xy(Align::w(FieldH(theme, "Selected", self.selected.describe(&self.tracks, &self.scenes)))),
Fill::xy(Align::e(row!(
FieldH(theme, "SR", fmtd.sr.view.clone()),
FieldH(theme, "Buf", fmtd.buf.view.clone()),

View file

@ -23,14 +23,13 @@ impl Tek {
Bsp::n(Tui::fg_bg(Rgb(255,255,255), Rgb(0,0,0),""), Bsp::a(
Fill::y(Align::nw(Fixed::xy(1, 1, Tui::fg(Rgb(255,255,255), "")))),
Fill::y(Fixed::x(1, Tui::fg(Rgb(0,0,0), RepeatV("")))),
)))
}
))) }
fn track_scrollbar (&self) -> impl Content<TuiOut> + use<'_> {
Bsp::e("", Bsp::w("", Bsp::a(
Fill::x(Align::nw(Fixed::xy(1, 1, Tui::fg(Rgb(255,255,255), "")))),
Fill::x(Fixed::y(1, Tui::fg(Rgb(0,0,0), RepeatH("")))),
)))
}
Bsp::e(Tui::fg_bg(Rgb(255,255,255), Rgb(0,0,0), "🞀"),
Bsp::w(Tui::fg_bg(Rgb(255,255,255), Rgb(0,0,0), "🞂"), Bsp::a(
Fill::x(Align::nw(Fixed::xy(1, 1, Tui::fg(Rgb(255,255,255), "")))),
Fill::x(Fixed::y(1, Tui::fg(Rgb(0,0,0), RepeatH("")))),
))) }
pub fn view_scenes (&self) -> impl Content<TuiOut> + use<'_> {
let w_full = self.w();
let w = self.w_tracks_area();