Mixed bag of things
This commit is contained in:
@@ -41,9 +41,20 @@ fn adjust_spans_for_line(
|
||||
|
||||
pub fn render(frame: &mut Frame, app: &App, link: &LinkState, snapshot: &SequencerSnapshot) {
|
||||
let term = frame.area();
|
||||
|
||||
let bg_color = if app.ui.event_flash > 0.0 {
|
||||
let i = (app.ui.event_flash * app.ui.flash_brightness * 60.0) as u8;
|
||||
Color::Rgb(i, i, i)
|
||||
} else {
|
||||
Color::Reset
|
||||
};
|
||||
|
||||
let blank = " ".repeat(term.width as usize);
|
||||
let lines: Vec<Line> = (0..term.height).map(|_| Line::raw(&blank)).collect();
|
||||
frame.render_widget(Paragraph::new(lines), term);
|
||||
frame.render_widget(
|
||||
Paragraph::new(lines).style(Style::default().bg(bg_color)),
|
||||
term,
|
||||
);
|
||||
|
||||
if app.ui.show_title {
|
||||
title_view::render(frame, term, &app.ui);
|
||||
|
||||
Reference in New Issue
Block a user