mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-13 07:06:41 +01:00
document stuff; Thunk suffix -> prefix
This commit is contained in:
parent
f9f9051eb7
commit
9d250daa04
16 changed files with 162 additions and 125 deletions
|
|
@ -121,7 +121,7 @@ impl PianoHorizontal {
|
|||
let note_lo = self.note_lo().get();
|
||||
let note_hi = self.note_hi();
|
||||
let buffer = self.buffer.clone();
|
||||
RenderThunk::new(move|to: &mut TuiOut|{
|
||||
ThunkRender::new(move|to: &mut TuiOut|{
|
||||
let source = buffer.read().unwrap();
|
||||
let [x0, y0, w, _h] = to.area().xywh();
|
||||
//if h as usize != note_axis {
|
||||
|
|
@ -156,7 +156,7 @@ impl PianoHorizontal {
|
|||
let time_pos = self.time_pos();
|
||||
let time_start = self.time_start().get();
|
||||
let time_zoom = self.time_zoom().get();
|
||||
RenderThunk::new(move|to: &mut TuiOut|{
|
||||
ThunkRender::new(move|to: &mut TuiOut|{
|
||||
let [x0, y0, w, _] = to.area().xywh();
|
||||
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
|
||||
if note == note_pos {
|
||||
|
|
@ -187,7 +187,7 @@ impl PianoHorizontal {
|
|||
let key_style = Some(Style::default().fg(Color::Rgb(192, 192, 192)).bg(Color::Rgb(0, 0, 0)));
|
||||
let off_style = Some(Style::default().fg(TuiTheme::g(160)));
|
||||
let on_style = Some(Style::default().fg(TuiTheme::g(255)).bg(color.base.rgb).bold());
|
||||
Fill::y(Fixed::x(self.keys_width, RenderThunk::new(move|to: &mut TuiOut|{
|
||||
Fill::y(Fixed::x(self.keys_width, ThunkRender::new(move|to: &mut TuiOut|{
|
||||
let [x, y0, _w, _h] = to.area().xywh();
|
||||
for (_area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
|
||||
to.blit(&to_key(note), x, screen_y, key_style);
|
||||
|
|
@ -203,7 +203,7 @@ impl PianoHorizontal {
|
|||
})))
|
||||
}
|
||||
fn timeline (&self) -> impl Content<TuiOut> + '_ {
|
||||
Fill::x(Fixed::y(1, RenderThunk::new(move|to: &mut TuiOut|{
|
||||
Fill::x(Fixed::y(1, ThunkRender::new(move|to: &mut TuiOut|{
|
||||
let [x, y, w, _h] = to.area();
|
||||
let style = Some(Style::default().dim());
|
||||
let length = self.clip.as_ref().map(|p|p.read().unwrap().length).unwrap_or(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue