mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
remove final instance of tui_style!
This commit is contained in:
parent
2f904ed78b
commit
1ab1b695a4
2 changed files with 7 additions and 10 deletions
|
|
@ -421,13 +421,6 @@ impl Widget for Styled<&str> {
|
|||
}
|
||||
}
|
||||
|
||||
#[macro_export] macro_rules! tui_style {
|
||||
($NAME:ident = $fg:expr, $bg:expr, $ul:expr, $add:expr, $sub:expr) => {
|
||||
pub const $NAME: Style = Style {
|
||||
fg: $fg, bg: $bg, underline_color: $ul, add_modifier: $add, sub_modifier: $sub,
|
||||
};
|
||||
}
|
||||
}
|
||||
pub trait TuiStyle: Widget<Engine = Tui> + Sized {
|
||||
fn fg (self, color: Color) -> impl Widget<Engine = Tui> {
|
||||
Layers::new(move |add|{ add(&Foreground(color))?; add(&self) })
|
||||
|
|
|
|||
|
|
@ -15,9 +15,13 @@ submod! {
|
|||
/// FIXME: use PPQ value from global timebase
|
||||
pub const PPQ: usize = 96;
|
||||
|
||||
pub const CORNERS: CornersTall = CornersTall(CORNERS_STYLE);
|
||||
tui_style!(CORNERS_STYLE =
|
||||
Some(Color::Rgb(96, 255, 32)), None, None, Modifier::empty(), Modifier::DIM);
|
||||
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)
|
||||
pub const NTH_OCTAVE: [&'static str;11] = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue