thunk -> draw
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
i do not exist 2026-08-03 09:41:07 +03:00
parent 5357e83245
commit 8de62463c0
5 changed files with 37 additions and 29 deletions

View file

@ -137,7 +137,7 @@ impl PianoHorizontal {
let note_lo = self.get_note_lo();
let note_hi = self.get_note_hi();
let buffer = self.buffer.clone();
thunk(move|to: &mut Tui|{
draw(move|to: &mut Tui|{
let xywh = to.area().into();
let XYWH(x0, y0, w, _h) = xywh;
let source = buffer.read().unwrap();
@ -175,7 +175,7 @@ impl PianoHorizontal {
let time_start = self.get_time_start();
let time_zoom = self.get_time_zoom();
let style = Some(Style::default().fg(self.color.lightest.term));
thunk(move|to: &mut Tui|{
draw(move|to: &mut Tui|{
let xywh = to.area().into();
let XYWH(x0, y0, w, _h) = xywh;
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
@ -209,7 +209,7 @@ impl PianoHorizontal {
let key_style = Some(Style::default().fg(Rgb(192, 192, 192)).bg(Rgb(0, 0, 0)));
let off_style = Some(Style::default().fg(g(255)));
let on_style = Some(Style::default().fg(Rgb(255,0,0)).bg(color.base.term).bold());
thunk(move|to: &mut Tui|{
draw(move|to: &mut Tui|{
let xywh = to.area().into();
let XYWH(x, y0, _w, _h) = xywh;
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
@ -228,7 +228,7 @@ impl PianoHorizontal {
}
fn timeline (&self) -> impl Draw<Tui> + '_ {
thunk(move|to: &mut Tui|{
draw(move|to: &mut Tui|{
let xywh = to.area().into();
let XYWH(x, y, w, _h) = xywh;
let style = Some(Style::default().dim());

View file

@ -141,7 +141,7 @@ impl ApplicationHandler for LV2PluginUI {
}
impl Draw<Tui> for Lv2 {
fn draw(self, to: &mut Tui) {
fn draw (&self, to: &mut Tui) {
let area = to.area();
let XYWH(x, y, _, height) = area;
let mut width = 20u16;

View file

@ -257,7 +257,7 @@ 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(move|to: &mut Tui|{
draw(move|to: &mut Tui|{
let xywh = to.area().into();
let XYWH(x, y, width, height) = xywh;
let area = Rect { x, y, width, height };