simplify focus

This commit is contained in:
🪞👃🪞 2024-12-10 21:26:33 +01:00
parent 1ceb2dd2da
commit 2f623783ec
5 changed files with 26 additions and 17 deletions

View file

@ -22,6 +22,7 @@ mod phrase_rename; pub(crate) use phrase_rename::*;
mod phrase_list; pub(crate) use phrase_list::*; mod phrase_list; pub(crate) use phrase_list::*;
mod phrase_player; pub(crate) use phrase_player::*; mod phrase_player; pub(crate) use phrase_player::*;
mod phrase_select; pub(crate) use phrase_select::*; mod phrase_select; pub(crate) use phrase_select::*;
mod port_select; pub(crate) use port_select::*;
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////

View file

@ -197,20 +197,20 @@ impl_focus!(SequencerTui SequencerFocus [
Transport(TransportFocus::Quant), Transport(TransportFocus::Quant),
Transport(TransportFocus::Clock), Transport(TransportFocus::Clock),
], ],
&[ //&[
PhrasePlay, //PhrasePlay,
PhrasePlay, //PhrasePlay,
PhraseEditor, //PhraseEditor,
PhraseEditor, //PhraseEditor,
PhraseEditor, //PhraseEditor,
], //],
&[ //&[
PhraseNext, //PhraseNext,
PhraseNext, //PhraseNext,
PhraseEditor, //PhraseEditor,
PhraseEditor, //PhraseEditor,
PhraseEditor, //PhraseEditor,
], //],
&[ &[
PhraseList, PhraseList,
PhraseList, PhraseList,

View file

@ -123,8 +123,8 @@ impl<T: HasClock> From<(&T, Option<ItemColorTriplet>, bool)> for TransportView {
struct TransportField<'a>(&'a str, &'a str); struct TransportField<'a>(&'a str, &'a str);
render!(|self: TransportField<'a>|{ render!(|self: TransportField<'a>|{
col!([ col!([
Tui::fg(Color::Rgb(150, 150, 150), self.0), Tui::fg(Color::Rgb(200, 200, 200), self.0),
Tui::bold(true, Tui::fg(Color::Rgb(200, 200, 200), self.1)), Tui::bold(true, Tui::fg(Color::Rgb(220, 220, 220), self.1)),
]) ])
}); });

View file

@ -436,7 +436,8 @@ impl PhraseViewMode {
for (y, note) in (0..127).rev().enumerate() { for (y, note) in (0..127).rev().enumerate() {
for (x, time) in (0..target.width).map(|x|(x, x*time_zoom)) { for (x, time) in (0..target.width).map(|x|(x, x*time_zoom)) {
let cell = target.get_mut(x, y).unwrap(); let cell = target.get_mut(x, y).unwrap();
cell.set_fg(Color::Rgb(48, 55, 45)); //cell.set_fg(Color::Rgb(48, 55, 45));
cell.set_fg(phrase.color.dark.rgb);
cell.set_char(if time % 384 == 0 { cell.set_char(if time % 384 == 0 {
'│' '│'
} else if time % 96 == 0 { } else if time % 96 == 0 {

View file

@ -0,0 +1,7 @@
use crate::*;
pub struct PortSelector {
pub(crate) title: &'static str,
}
render!(|self: PortSelector|{});