Small corrections

This commit is contained in:
2026-02-08 01:33:50 +01:00
parent af6016b9a9
commit f6e7330ad6
20 changed files with 288 additions and 49 deletions

View File

@@ -333,14 +333,23 @@ fn render_header(
let cpu_pct = (app.metrics.cpu_load * 100.0).min(100.0);
let peers = link.peers();
let voices = app.metrics.active_voices;
let stats_text = format!(" CPU {cpu_pct:.0}% V:{voices} L:{peers} ");
let stats_style = Style::new()
.bg(theme.header.stats_bg)
.fg(theme.header.stats_fg);
let cpu_color = if cpu_pct >= 80.0 {
theme.flash.error_fg
} else if cpu_pct >= 50.0 {
theme.ui.accent
} else {
theme.header.stats_fg
};
let dim = Style::new().bg(theme.header.stats_bg).fg(theme.header.stats_fg);
let stats_line = Line::from(vec![
Span::styled(format!(" CPU {cpu_pct:.0}%"), dim.fg(cpu_color)),
Span::styled(format!(" V:{voices} L:{peers} "), dim),
]);
let block_style = Style::new().bg(theme.header.stats_bg);
frame.render_widget(
Paragraph::new(stats_text)
.block(Block::default().padding(pad).style(stats_style))
.alignment(Alignment::Right),
Paragraph::new(stats_line)
.block(Block::default().padding(pad).style(block_style))
.alignment(Alignment::Center),
stats_area,
);
}
@@ -809,6 +818,8 @@ fn render_modal(frame: &mut Frame, app: &App, snapshot: &SequencerSnapshot, term
Span::styled(" eval ", dim),
Span::styled("C-f", key),
Span::styled(" find ", dim),
Span::styled("C-b", key),
Span::styled(" samples ", dim),
Span::styled("C-s", key),
Span::styled(" stack ", dim),
Span::styled("C-u", key),