mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
add no-github badge
This commit is contained in:
parent
38e8cfc214
commit
2b78339e61
4 changed files with 19 additions and 11 deletions
|
|
@ -20,14 +20,14 @@ impl<E: Engine, S, C: Command<S>> MenuBar<E, S, C> {
|
|||
pub struct Menu<E: Engine, S, C: Command<S>> {
|
||||
pub title: String,
|
||||
pub items: Vec<MenuItem<E, S, C>>,
|
||||
pub index: usize,
|
||||
pub index: Option<usize>,
|
||||
}
|
||||
impl<E: Engine, S, C: Command<S>> Menu<E, S, C> {
|
||||
pub fn new (title: impl AsRef<str>) -> Self {
|
||||
Self {
|
||||
title: title.as_ref().to_string(),
|
||||
items: vec![],
|
||||
index: 0
|
||||
index: None,
|
||||
}
|
||||
}
|
||||
pub fn add (mut self, item: MenuItem<E, S, C>) -> Self {
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ impl<E: Engine> Arranger<E> {
|
|||
jack: jack.clone(),
|
||||
focus_cursor: (0, 1),
|
||||
phrases_split: 20,
|
||||
arrangement_split: 21,
|
||||
arrangement_split: 15,
|
||||
editor: PhraseEditor::new(),
|
||||
status: ArrangerStatusBar::ArrangementClip,
|
||||
transport: transport.clone(),
|
||||
|
|
|
|||
|
|
@ -5,17 +5,23 @@ impl Content for Arranger<Tui> {
|
|||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
Split::down(
|
||||
1,
|
||||
widget(&self.transport),
|
||||
row!(menu in self.menu.menus.iter() => {
|
||||
row!(" ", menu.title.as_str(), " ")
|
||||
}),
|
||||
Split::up(
|
||||
1,
|
||||
widget(&self.status),
|
||||
Split::down(
|
||||
self.arrangement_split,
|
||||
widget(&self.arrangement),
|
||||
Split::right(
|
||||
self.phrases_split,
|
||||
self.phrases.clone(),
|
||||
widget(&self.editor),
|
||||
Split::up(
|
||||
1,
|
||||
widget(&self.transport),
|
||||
Split::down(
|
||||
self.arrangement_split,
|
||||
widget(&self.arrangement),
|
||||
Split::right(
|
||||
self.phrases_split,
|
||||
self.phrases.clone(),
|
||||
widget(&self.editor),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue