From 1408c0c3cea907d4a6b86c5fe58e92c9faec8301 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 23 Dec 2024 22:37:41 +0100 Subject: [PATCH] colorize phrase cursor --- crates/tek/src/tui/piano_horizontal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tek/src/tui/piano_horizontal.rs b/crates/tek/src/tui/piano_horizontal.rs index fc2acbf1..045551b3 100644 --- a/crates/tek/src/tui/piano_horizontal.rs +++ b/crates/tek/src/tui/piano_horizontal.rs @@ -130,6 +130,7 @@ render!(|self: PianoHorizontalKeys<'a>|render(|to|Ok({ pub struct PianoHorizontalCursor<'a>(&'a PianoHorizontal); render!(|self: PianoHorizontalCursor<'a>|render(|to|Ok({ + let style = Some(Style::default().fg(self.0.color.lightest.rgb)); let note_hi = self.0.note_hi(); let note_len = self.0.note_len(); let note_lo = self.0.note_lo().get(); @@ -138,7 +139,6 @@ render!(|self: PianoHorizontalCursor<'a>|render(|to|Ok({ let time_start = self.0.time_start().get(); let time_zoom = self.0.time_zoom().get(); let [x0, y0, w, _] = to.area().xywh(); - let style = Some(Style::default().fg(Color::Rgb(0,255,0))); for (area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) { if note == note_point { for x in 0..w { @@ -227,7 +227,7 @@ impl PianoHorizontal { } /// Draw the piano roll background using full blocks on note on and half blocks on legato: █▄ █▄ █▄ fn draw_fg (buf: &mut BigBuffer, phrase: &Phrase, zoom: usize) { - let style = Style::default().fg(phrase.color.lightest.rgb);//.bg(Color::Rgb(0, 0, 0)); + let style = Style::default().fg(phrase.color.base.rgb);//.bg(Color::Rgb(0, 0, 0)); let mut notes_on = [false;128]; for (x, time_start) in (0..phrase.length).step_by(zoom).enumerate() {