arranger: track name offset; cleanup

This commit is contained in:
🪞👃🪞 2024-08-21 23:09:04 +03:00
parent b3ae4ad3db
commit 1dbe151ae6
3 changed files with 7 additions and 11 deletions

View file

@ -1,5 +1,3 @@
use crate::*;
macro_rules! impl_axis_common { ($A:ident $T:ty) => {
impl $A<$T> {
pub fn start_inc (&mut self) -> $T {

View file

@ -7,18 +7,18 @@ use tek_core::Direction;
pub struct Arranger {
/// Name of arranger
pub name: String,
/// Display mode of arranger
pub mode: ArrangerViewMode,
/// Currently selected element.
pub selected: ArrangerFocus,
/// Collection of tracks.
pub tracks: Vec<Sequencer>,
/// Collection of scenes.
pub scenes: Vec<Scene>,
/// Currently selected element.
pub selected: ArrangerFocus,
/// Display mode of arranger
pub mode: ArrangerViewMode,
pub focused: bool,
pub entered: bool,
pub transport: Option<Arc<RwLock<TransportToolbar>>>,
pub show_sequencer: Option<Direction>,
pub focus_sequencer: bool,
pub modal: Option<Box<dyn ExitableComponent>>,
}
@ -33,8 +33,6 @@ impl Arranger {
tracks: vec![],
entered: true,
focused: true,
transport: None,
show_sequencer: Some(Direction::Down),
focus_sequencer: false,
modal: None
}

View file

@ -162,7 +162,7 @@ impl<'a> Render for TracksHeader<'a> {
if x > width {
break
}
track.name.blit(buf, offset + x, y, Some(Style::default()))?;
track.name.blit(buf, offset + x + 1, y, Some(Style::default()))?;
}
Ok(Rect { x: area.x, y, width, height: 2 })
}