working multi

This commit is contained in:
filipriec
2025-02-16 21:36:43 +01:00
parent a7d35942a1
commit c4356dcff6
5 changed files with 52 additions and 40 deletions

View File

@@ -5,18 +5,18 @@ use ratatui::{
layout::Rect,
Frame,
};
use crate::client::colors::PastelGrayTheme;
use crate::client::colors::Theme;
pub fn render_command_line(f: &mut Frame, area: Rect, input: &str, active: bool) {
pub fn render_command_line(f: &mut Frame, area: Rect, input: &str, active: bool, theme: &Theme) {
let prompt = if active { ":" } else { "Press ':' for commands" };
let style = if active {
Style::default().fg(DoomColors::CYAN)
Style::default().fg(theme.accent)
} else {
Style::default().fg(DoomColors::HL)
Style::default().fg(theme.fg)
};
let paragraph = Paragraph::new(format!("{}{}", prompt, input))
.block(Block::default().style(Style::default().bg(DoomColors::BG)))
.block(Block::default().style(Style::default().bg(theme.bg)))
.style(style);
f.render_widget(paragraph, area);