mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
add CornersOuter
This commit is contained in:
parent
e7fbb359c7
commit
49fe3322e1
4 changed files with 17 additions and 3 deletions
|
|
@ -115,7 +115,7 @@ render!(<Tui>|self: ArrangerTui|{
|
||||||
let arranger = ||lay!(|add|{
|
let arranger = ||lay!(|add|{
|
||||||
let color = self.color;
|
let color = self.color;
|
||||||
add(&Fill::wh(Tui::bg(color.darkest.rgb, ())))?;
|
add(&Fill::wh(Tui::bg(color.darkest.rgb, ())))?;
|
||||||
add(&Fill::wh(Lozenge(Style::default().fg(color.light.rgb).bg(color.darker.rgb))))?;
|
add(&Fill::wh(CornersOuter(Style::default().fg(color.dark.rgb).bg(color.darkest.rgb))))?;
|
||||||
add(&Self::render_mode(self))
|
add(&Self::render_mode(self))
|
||||||
});
|
});
|
||||||
with_size(with_status(with_editbar(with_pool(with_transport(col!([
|
with_size(with_status(with_editbar(with_pool(with_transport(col!([
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,9 @@ render!(<Tui>|self: PhraseListView<'a>|{
|
||||||
let title_color = TuiTheme::ti1();
|
let title_color = TuiTheme::ti1();
|
||||||
let upper_left = "Pool:";
|
let upper_left = "Pool:";
|
||||||
let upper_right = format!("({})", phrases.len());
|
let upper_right = format!("({})", phrases.len());
|
||||||
|
let color = ItemPalette::from(Color::Rgb(128,0,0));
|
||||||
Tui::bg(bg, lay!(move|add|{
|
Tui::bg(bg, lay!(move|add|{
|
||||||
|
add(&Fill::wh(CornersOuter(Style::default().fg(color.light.rgb).bg(bg))))?;
|
||||||
//add(&Lozenge(Style::default().bg(border_bg).fg(border_color)))?;
|
//add(&Lozenge(Style::default().bg(border_bg).fg(border_color)))?;
|
||||||
add(&Tui::inset_xy(0, 1, Fill::wh(col!(move|add|match mode {
|
add(&Tui::inset_xy(0, 1, Fill::wh(col!(move|add|match mode {
|
||||||
Some(PhraseListMode::Import(_, ref file_picker)) => add(file_picker),
|
Some(PhraseListMode::Import(_, ref file_picker)) => add(file_picker),
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,15 @@ render!(<Tui>|self: PianoHorizontal|{
|
||||||
let notes = move||PianoHorizontalNotes(&self);
|
let notes = move||PianoHorizontalNotes(&self);
|
||||||
let cursor = move||PianoHorizontalCursor(&self);
|
let cursor = move||PianoHorizontalCursor(&self);
|
||||||
let keys_width = 5;
|
let keys_width = 5;
|
||||||
Fill::wh(Bsp::s(
|
let border = Fill::wh(CornersOuter(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)));
|
||||||
|
let with_border = |x|lay!([border, Tui::inset_xy(1, 1, &x)]);
|
||||||
|
with_border(Fill::wh(Bsp::s(
|
||||||
Fixed::h(1, Bsp::e(Fixed::w(keys_width, ""), Fill::w(timeline()),)),
|
Fixed::h(1, Bsp::e(Fixed::w(keys_width, ""), Fill::w(timeline()),)),
|
||||||
Bsp::e(
|
Bsp::e(
|
||||||
Fixed::w(keys_width, keys()),
|
Fixed::w(keys_width, keys()),
|
||||||
Fill::wh(lay!([&self.size, Fill::wh(lay!([Fill::wh(notes()), Fill::wh(cursor()),]))])),
|
Fill::wh(lay!([&self.size, Fill::wh(lay!([Fill::wh(notes()), Fill::wh(cursor()),]))])),
|
||||||
),
|
),
|
||||||
))
|
)))
|
||||||
});
|
});
|
||||||
|
|
||||||
pub struct PianoHorizontalTimeline<'a>(&'a PianoHorizontal);
|
pub struct PianoHorizontalTimeline<'a>(&'a PianoHorizontal);
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,16 @@ border! {
|
||||||
"" ""
|
"" ""
|
||||||
"🭼" "" "🭿" fn style (&self) -> Option<Style> { Some(self.0) }
|
"🭼" "" "🭿" fn style (&self) -> Option<Style> { Some(self.0) }
|
||||||
},
|
},
|
||||||
|
CornersOuter {
|
||||||
|
"🭽" "▔" "🭾"
|
||||||
|
"▏" "▕"
|
||||||
|
"🭼" "▁" "🭿"
|
||||||
|
const W0: &'static str = "[";
|
||||||
|
const E0: &'static str = "]";
|
||||||
|
const N0: &'static str = "⎴";
|
||||||
|
const S0: &'static str = "⎵";
|
||||||
|
fn style (&self) -> Option<Style> { Some(self.0) }
|
||||||
|
},
|
||||||
Brackets {
|
Brackets {
|
||||||
"⎡" "" "⎤"
|
"⎡" "" "⎤"
|
||||||
"" ""
|
"" ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue