mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +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) => {
|
macro_rules! impl_axis_common { ($A:ident $T:ty) => {
|
||||||
impl $A<$T> {
|
impl $A<$T> {
|
||||||
pub fn start_inc (&mut self) -> $T {
|
pub fn start_inc (&mut self) -> $T {
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,18 @@ use tek_core::Direction;
|
||||||
pub struct Arranger {
|
pub struct Arranger {
|
||||||
/// Name of arranger
|
/// Name of arranger
|
||||||
pub name: String,
|
pub name: String,
|
||||||
/// Display mode of arranger
|
|
||||||
pub mode: ArrangerViewMode,
|
|
||||||
/// Currently selected element.
|
|
||||||
pub selected: ArrangerFocus,
|
|
||||||
/// Collection of tracks.
|
/// Collection of tracks.
|
||||||
pub tracks: Vec<Sequencer>,
|
pub tracks: Vec<Sequencer>,
|
||||||
/// Collection of scenes.
|
/// Collection of scenes.
|
||||||
pub scenes: Vec<Scene>,
|
pub scenes: Vec<Scene>,
|
||||||
|
/// Currently selected element.
|
||||||
|
pub selected: ArrangerFocus,
|
||||||
|
/// Display mode of arranger
|
||||||
|
pub mode: ArrangerViewMode,
|
||||||
|
|
||||||
|
|
||||||
pub focused: bool,
|
pub focused: bool,
|
||||||
pub entered: bool,
|
pub entered: bool,
|
||||||
pub transport: Option<Arc<RwLock<TransportToolbar>>>,
|
|
||||||
pub show_sequencer: Option<Direction>,
|
|
||||||
pub focus_sequencer: bool,
|
pub focus_sequencer: bool,
|
||||||
pub modal: Option<Box<dyn ExitableComponent>>,
|
pub modal: Option<Box<dyn ExitableComponent>>,
|
||||||
}
|
}
|
||||||
|
|
@ -33,8 +33,6 @@ impl Arranger {
|
||||||
tracks: vec![],
|
tracks: vec![],
|
||||||
entered: true,
|
entered: true,
|
||||||
focused: true,
|
focused: true,
|
||||||
transport: None,
|
|
||||||
show_sequencer: Some(Direction::Down),
|
|
||||||
focus_sequencer: false,
|
focus_sequencer: false,
|
||||||
modal: None
|
modal: None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ impl<'a> Render for TracksHeader<'a> {
|
||||||
if x > width {
|
if x > width {
|
||||||
break
|
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 })
|
Ok(Rect { x: area.x, y, width, height: 2 })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue