mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
arranger: track name offset; cleanup
This commit is contained in:
parent
b3ae4ad3db
commit
1dbe151ae6
3 changed files with 7 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue