Formatting

This commit is contained in:
Ian Keane 2025-11-16 10:55:48 -05:00
parent 811743e1e4
commit 045e11cd63

View file

@ -110,7 +110,7 @@ fn render_bottom_bar(frame: &mut Frame, area: Rect, app: &App) {
let command_text = format!(" {}", commands.iter()
.map(|(key, desc)| format!("{} ({})", key, desc))
.collect::<Vec<_>>()
.join(" · "));
.join(" · "));
let command_area = if app.config.show_help_hint {
// Leave space for help hint
@ -151,7 +151,7 @@ fn render_help_command_bar(frame: &mut Frame) {
let command_text = format!(" {}", commands.iter()
.map(|(key, desc)| format!("{} ({})", key, desc))
.collect::<Vec<_>>()
.join(" · "));
.join(" · "));
let bar_area = Rect::new(
0,
@ -217,7 +217,8 @@ fn render_section(
}
fn render_help(frame: &mut Frame, _app: &App) {
let area = centered_rect(60, frame.size().height.saturating_sub(2), frame.size());
let width = frame.size().width.saturating_sub(4).min(60);
let area = centered_rect(width, frame.size().height.saturating_sub(2), frame.size());
frame.render_widget(Clear, area);
@ -255,14 +256,16 @@ fn render_help(frame: &mut Frame, _app: &App) {
let paragraph = Paragraph::new(text)
.block(block)
.style(Style::default().fg(Color::White));
.style(Style::default().fg(Color::White))
.wrap(ratatui::widgets::Wrap { trim: true });
frame.render_widget(paragraph, area);
render_help_command_bar(frame);
}
fn render_config_help(frame: &mut Frame, _app: &App) {
let area = centered_rect(60, frame.size().height.saturating_sub(2), frame.size());
let width = frame.size().width.saturating_sub(4).min(60);
let area = centered_rect(width, frame.size().height.saturating_sub(2), frame.size());
frame.render_widget(Clear, area);
@ -291,7 +294,8 @@ fn render_config_help(frame: &mut Frame, _app: &App) {
let paragraph = Paragraph::new(text)
.block(block)
.style(Style::default().fg(Color::White));
.style(Style::default().fg(Color::White))
.wrap(ratatui::widgets::Wrap { trim: true });
frame.render_widget(paragraph, area);
render_help_command_bar(frame);