-
-
Notifications
You must be signed in to change notification settings - Fork 39
background color and centering, how to? #103
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm drawing to a display that doesn't seem to perfectly match any of the font size options you've provided so I get some extra borders around my terminal that are drawn white. I have a few questions regarding that.
- is there a way to make this area black instead of white
- is there a way to adjust the centering of the drawn area, it looks like if i shifted everything up and right 1 pixel it would be centered better.
Maybe I'm just configuring something incorrectly?
here is how i'm drawing (copied from your examples)
let text = "Ratatui on embedded devices!";
let paragraph = Paragraph::new(text.white()).wrap(Wrap { trim: true }).on_black();
let bordered_block = Block::bordered()
.border_style(Style::new().white())
.title("Mousefood");
frame.render_widget(paragraph.block(bordered_block), frame.area());here is how i setup my terminal
let config = EmbeddedBackendConfig {
flush_callback: Box::new(move |d: &mut MoveDisplay| {
draw_tx.send(DrawCommand { data: d.framebuffer().clone() }).unwrap();
}),
font_regular: mousefood::fonts::MONO_5X8,
font_bold: mousefood::fonts::MONO_5X8,
..Default::default()
};
let backend = EmbeddedBackend::new(&mut display, config);
let mut terminal = ratatui::Terminal::new(backend).expect("to create terminal");Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
