add no-github badge

This commit is contained in:
🪞👃🪞 2024-11-08 21:42:18 +01:00
parent 38e8cfc214
commit 2b78339e61
4 changed files with 19 additions and 11 deletions

View file

@ -1,5 +1,7 @@
# tek
[![Please don't upload to GitHub](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page)
a music making program for your terminal
## project status

View file

@ -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 {

View file

@ -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(),

View file

@ -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),
)
)
)
)