foreground, background -> fg, bg

This commit is contained in:
🪞👃🪞 2024-09-29 23:47:34 +03:00
parent 49c892328a
commit ad39376659
2 changed files with 3 additions and 3 deletions

View file

@ -402,10 +402,10 @@ impl Widget for Styled<&str> {
}
}
pub trait TuiStyle: Widget<Engine = Tui> + Sized {
fn foreground (self, color: Color) -> impl Widget<Engine = Tui> {
fn fg (self, color: Color) -> impl Widget<Engine = Tui> {
Layers::new(move |add|{ add(&Foreground(color))?; add(&self) })
}
fn background (self, color: Color) -> impl Widget<Engine = Tui> {
fn bg (self, color: Color) -> impl Widget<Engine = Tui> {
Layers::new(move |add|{ add(&Background(color))?; add(&self) })
}
fn border (self, style: impl BorderStyle) -> impl Widget<Engine = Tui> {

View file

@ -1431,7 +1431,7 @@ impl Content for Sequencer<Tui> {
row!(toolbar, content)
.fill_x()
//.inset_x(1)
.background(Color::Rgb(40,50,30))
.bg(Color::Rgb(40,50,30))
.border(Lozenge(Style::default()
.bg(Color::Rgb(40,50,30))
.fg(Color::Rgb(70,80,50))))