mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
editor: reverse highlight
This commit is contained in:
parent
4a9e9132f3
commit
b7152ef807
4 changed files with 38 additions and 23 deletions
|
|
@ -223,12 +223,12 @@ fn draw_info (sample: Option<&Arc<RwLock<Sample>>>) -> impl Content<TuiOut> + us
|
|||
let sample = sample.unwrap().read().unwrap();
|
||||
let theme = sample.color;
|
||||
row!(
|
||||
FieldH(theme, "Name", format!("{:<10}", sample.name.clone())),
|
||||
FieldH(theme, "Length", format!("{:<8}", sample.channels[0].len())),
|
||||
FieldH(theme, "Start", format!("{:<8}", sample.start)),
|
||||
FieldH(theme, "End", format!("{:<8}", sample.end)),
|
||||
FieldH(theme, "Transpose", " 0 "),
|
||||
FieldH(theme, "Gain", format!("{}", sample.gain)),
|
||||
FieldH(theme, "Name", format!("{:<10}", sample.name.clone())),
|
||||
FieldH(theme, "Length", format!("{:<8}", sample.channels[0].len())),
|
||||
FieldH(theme, "Start", format!("{:<8}", sample.start)),
|
||||
FieldH(theme, "End", format!("{:<8}", sample.end)),
|
||||
FieldH(theme, "Trans", "0"),
|
||||
FieldH(theme, "Gain", format!("{}", sample.gain)),
|
||||
)
|
||||
}))
|
||||
}
|
||||
|
|
@ -239,11 +239,11 @@ fn draw_info_v (sample: Option<&Arc<RwLock<Sample>>>) -> impl Content<TuiOut> +
|
|||
let theme = sample.color;
|
||||
Fixed::x(20, col!(
|
||||
Fill::x(Align::w(FieldH(theme, "Name ", format!("{:<10}", sample.name.clone())))),
|
||||
Fill::x(Align::w(FieldH(theme, "Length", format!("{:<8}", sample.channels[0].len())))),
|
||||
Fill::x(Align::w(FieldH(theme, "Start ", format!("{:<8}", sample.start)))),
|
||||
Fill::x(Align::w(FieldH(theme, "End ", format!("{:<8}", sample.end)))),
|
||||
Fill::x(Align::w(FieldH(theme, "Trans ", "0 "))),
|
||||
Fill::x(Align::w(FieldH(theme, "Gain ", format!("{}", sample.gain)))),
|
||||
Fill::x(Align::w(FieldH(theme, "Length", format!("{:<8}", sample.channels[0].len())))),
|
||||
Fill::x(Align::w(FieldH(theme, "Start ", format!("{:<8}", sample.start)))),
|
||||
Fill::x(Align::w(FieldH(theme, "End ", format!("{:<8}", sample.end)))),
|
||||
Fill::x(Align::w(FieldH(theme, "Trans ", "0"))),
|
||||
Fill::x(Align::w(FieldH(theme, "Gain ", format!("{}", sample.gain)))),
|
||||
))
|
||||
}), Thunk::new(move||Tui::fg(Red, col!(
|
||||
"× No sample.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue