mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 15:56:57 +02:00
109e...
This commit is contained in:
parent
b44dc635ef
commit
80fe958476
8 changed files with 69 additions and 45 deletions
|
|
@ -596,8 +596,9 @@ fn draw_list_item (sample: &Option<Arc<RwLock<Sample>>>) -> String {
|
|||
|
||||
fn draw_viewer (sample: Option<&Arc<RwLock<Sample>>>) -> impl Draw<Tui> + use<'_> {
|
||||
let min_db = -64.0;
|
||||
Thunk::new(move|to: &mut Tui|{
|
||||
let XYWH(x, y, width, height) = to.area();
|
||||
thunk(move|to: &mut Tui|{
|
||||
let xywh = to.area().into();
|
||||
let XYWH(x, y, width, height) = xywh;
|
||||
let area = Rect { x, y, width, height };
|
||||
if let Some(sample) = &sample {
|
||||
let sample = sample.read().unwrap();
|
||||
|
|
@ -631,7 +632,8 @@ fn draw_viewer (sample: Option<&Arc<RwLock<Sample>>>) -> impl Draw<Tui> + use<'_
|
|||
//height as f64 / 2.0,
|
||||
//text.red()
|
||||
//);
|
||||
}).render(area, &mut to.1);
|
||||
})
|
||||
.render(area, to.as_mut());
|
||||
} else {
|
||||
Canvas::default()
|
||||
.x_bounds([0.0, width as f64])
|
||||
|
|
@ -644,8 +646,9 @@ fn draw_viewer (sample: Option<&Arc<RwLock<Sample>>>) -> impl Draw<Tui> + use<'_
|
|||
//text.red()
|
||||
//);
|
||||
})
|
||||
.render(area, &mut to.1);
|
||||
.render(area, to.as_mut());
|
||||
}
|
||||
Ok(xywh)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue