mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
simplify
This commit is contained in:
parent
d7bbc2a412
commit
e3a3962130
15 changed files with 74 additions and 81 deletions
|
|
@ -8,6 +8,8 @@ pub struct MidiEditor {
|
|||
pub mode: PianoHorizontal,
|
||||
}
|
||||
|
||||
has!(Measure<TuiOut>: |self: MidiEditor|self.size);
|
||||
|
||||
impl std::fmt::Debug for MidiEditor {
|
||||
fn fmt (&self, f: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
|
||||
f.debug_struct("MidiEditor")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
use crate::*;
|
||||
|
||||
has_size!(<TuiOut>|self: MidiEditor|&self.size);
|
||||
|
||||
content!(TuiOut: |self: MidiEditor| {
|
||||
self.autoscroll();
|
||||
//self.autozoom();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ pub struct PianoHorizontal {
|
|||
pub keys_width: u16,
|
||||
}
|
||||
|
||||
has!(Measure<TuiOut>:|self:PianoHorizontal|self.size);
|
||||
|
||||
impl PianoHorizontal {
|
||||
pub fn new (clip: Option<&Arc<RwLock<MidiClip>>>) -> Self {
|
||||
let size = Measure::new();
|
||||
|
|
@ -227,8 +229,6 @@ impl PianoHorizontal {
|
|||
}
|
||||
}
|
||||
|
||||
has_size!(<TuiOut>|self:PianoHorizontal|&self.size);
|
||||
|
||||
impl TimeRange for PianoHorizontal {
|
||||
fn time_len (&self) -> &AtomicUsize { self.range.time_len() }
|
||||
fn time_zoom (&self) -> &AtomicUsize { self.range.time_zoom() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue