55e...
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
okay stopped screaming 2026-03-22 00:36:09 +02:00
parent 9ef63324af
commit 2fd5fbaaf9
5 changed files with 27 additions and 27 deletions

View file

@ -45,7 +45,7 @@ def_command!(MidiEditCommand: |editor: MidiEditor| {
/// ```
pub struct MidiEditor {
/// Size of editor on screen
pub size: Measure<Tui>,
pub size: [AtomicUsize; 2],
/// View mode and state of editor
pub mode: PianoHorizontal,
}
@ -60,13 +60,13 @@ pub struct MidiEditor {
/// Buffer where the whole clip is rerendered on change
pub buffer: Arc<RwLock<BigBuffer>>,
/// Size of actual notes area
pub size: Measure<Tui>,
pub size: [AtomicUsize; 2],
/// The display window
pub range: MidiSelection,
pub range: MidiSelection,
/// The note cursor
pub point: MidiCursor,
pub point: MidiCursor,
/// The highlight color palette
pub color: ItemTheme,
pub color: ItemTheme,
/// Width of the keyboard
pub keys_width: u16,
}
@ -646,8 +646,8 @@ impl_has!(Sequencer: |self: Track| self.sequencer);
impl_has!(Clock: |self: Sequencer| self.clock);
impl_has!(Vec<MidiInput>: |self: Sequencer| self.midi_ins);
impl_has!(Vec<MidiOutput>: |self: Sequencer| self.midi_outs);
impl_has!(Measure<Tui>: |self: MidiEditor| self.size);
impl_has!(Measure<Tui>: |self: PianoHorizontal| self.size);
impl_has!([AtomicUsize; 2]: |self: MidiEditor| self.size);
impl_has!([AtomicUsize; 2]: |self: PianoHorizontal| self.size);
impl_default!(Sequencer: Self {
clock: Clock::default(),
play_clip: None,
@ -890,7 +890,7 @@ impl_from!(MidiEditor: |clip: Option<Arc<RwLock<MidiClip>>>| {
model
});
impl_default!(MidiEditor: Self {
size: Measure::new(0, 0), mode: PianoHorizontal::new(None)
size: [0, 0].into(), mode: PianoHorizontal::new(None)
});
impl_default!(OctaveVertical: Self {
on: [false; 12], colors: [Rgb(255,255,255), Rgb(0,0,0), Rgb(255,0,0)]
@ -1040,7 +1040,7 @@ impl MidiEditor {
impl PianoHorizontal {
pub fn new (clip: Option<&Arc<RwLock<MidiClip>>>) -> Self {
let size = Measure::new(0, 0);
let size = [0, 0].into();
let mut range = MidiSelection::from((12, true));
range.time_axis = size.x.clone();
range.note_axis = size.y.clone();