mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
remove old color defs; move PPQ and CORNERS to core
This commit is contained in:
parent
1ab1b695a4
commit
0f3103a003
4 changed files with 11 additions and 24 deletions
|
|
@ -2,6 +2,8 @@ use crate::*;
|
||||||
use std::iter::Iterator;
|
use std::iter::Iterator;
|
||||||
|
|
||||||
pub const DEFAULT_PPQ: f64 = 96.0;
|
pub const DEFAULT_PPQ: f64 = 96.0;
|
||||||
|
/// FIXME: remove this and use PPQ from timebase everywhere:
|
||||||
|
pub const PPQ: usize = 96;
|
||||||
|
|
||||||
/// A unit of time, represented as an atomic 64-bit float.
|
/// A unit of time, represented as an atomic 64-bit float.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -676,14 +676,10 @@ border! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const COLOR_BG0: Color = Color::Rgb(30, 33, 36);
|
pub const CORNERS: CornersTall = CornersTall(Style {
|
||||||
pub const COLOR_BG1: Color = Color::Rgb(41, 46, 57);
|
fg: Some(Color::Rgb(96, 255, 32)),
|
||||||
pub const COLOR_BG2: Color = Color::Rgb(46, 52, 64);
|
bg: None,
|
||||||
pub const COLOR_BG3: Color = Color::Rgb(59, 66, 82);
|
underline_color: None,
|
||||||
pub const COLOR_BG4: Color = Color::Rgb(67, 76, 94);
|
add_modifier: Modifier::empty(),
|
||||||
pub const COLOR_BG5: Color = Color::Rgb(76, 86, 106);
|
sub_modifier: Modifier::DIM
|
||||||
pub const COLOR_RED: Color = Color::Rgb(191, 97, 106);
|
});
|
||||||
pub const COLOR_YELLOW: Color = Color::Rgb(235, 203, 139);
|
|
||||||
pub const COLOR_GREEN: Color = Color::Rgb(163, 190, 140);
|
|
||||||
pub const COLOR_PLAYING: Color = Color::Rgb(60, 100, 50);
|
|
||||||
pub const COLOR_SEPARATOR: Color = Color::Rgb(0, 0, 0);
|
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
let any_size = |_|Ok(Some([0,0]));
|
let any_size = |_|Ok(Some([0,0]));
|
||||||
// column separators
|
// column separators
|
||||||
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{
|
||||||
let style = Some(Style::default().fg(COLOR_SEPARATOR));
|
let style = Some(Style::default().fg(Color::Rgb(0, 0, 0)));
|
||||||
Ok(for x in cols.iter().map(|col|col.1) {
|
Ok(for x in cols.iter().map(|col|col.1) {
|
||||||
let x = scene_title_w + to.area().x() + x as u16;
|
let x = scene_title_w + to.area().x() + x as u16;
|
||||||
for y in to.area().y()..to.area().y2() { to.blit(&"▎", x, y, style); }
|
for y in to.area().y()..to.area().y2() { to.blit(&"▎", x, y, style); }
|
||||||
|
|
@ -164,7 +164,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
if x < to.buffer.area.x && y < to.buffer.area.y {
|
if x < to.buffer.area.x && y < to.buffer.area.y {
|
||||||
let cell = to.buffer.get_mut(x, y);
|
let cell = to.buffer.get_mut(x, y);
|
||||||
cell.modifier = Modifier::UNDERLINED;
|
cell.modifier = Modifier::UNDERLINED;
|
||||||
cell.underline_color = COLOR_SEPARATOR;
|
cell.underline_color = Color::Rgb(0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,6 @@ submod! {
|
||||||
transport transport_cmd transport_tui transport_snd
|
transport transport_cmd transport_tui transport_snd
|
||||||
}
|
}
|
||||||
|
|
||||||
/// FIXME: use PPQ value from global timebase
|
|
||||||
pub const PPQ: usize = 96;
|
|
||||||
|
|
||||||
pub const CORNERS: CornersTall = CornersTall(Style {
|
|
||||||
fg: Some(Color::Rgb(96, 255, 32)),
|
|
||||||
bg: None,
|
|
||||||
underline_color: None,
|
|
||||||
add_modifier: Modifier::empty(),
|
|
||||||
sub_modifier: Modifier::DIM
|
|
||||||
});
|
|
||||||
|
|
||||||
/// Octave number (from -1 to 9)
|
/// Octave number (from -1 to 9)
|
||||||
pub const NTH_OCTAVE: [&'static str;11] = [
|
pub const NTH_OCTAVE: [&'static str;11] = [
|
||||||
"-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
"-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue