Monster commit: native version
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use crate::theme::{browser, input, ui};
|
||||
use ratatui::style::Color;
|
||||
use ratatui::layout::{Constraint, Layout, Rect};
|
||||
use ratatui::style::{Color, Style};
|
||||
use ratatui::style::Style;
|
||||
use ratatui::text::{Line, Span};
|
||||
use ratatui::widgets::Paragraph;
|
||||
use ratatui::Frame;
|
||||
@@ -25,7 +27,7 @@ impl<'a> FileBrowserModal<'a> {
|
||||
entries,
|
||||
selected: 0,
|
||||
scroll_offset: 0,
|
||||
border_color: Color::White,
|
||||
border_color: ui::TEXT_PRIMARY,
|
||||
width: 60,
|
||||
height: 16,
|
||||
}
|
||||
@@ -69,8 +71,8 @@ impl<'a> FileBrowserModal<'a> {
|
||||
frame.render_widget(
|
||||
Paragraph::new(Line::from(vec![
|
||||
Span::raw("> "),
|
||||
Span::styled(self.input, Style::new().fg(Color::Cyan)),
|
||||
Span::styled("█", Style::new().fg(Color::White)),
|
||||
Span::styled(self.input, Style::new().fg(input::TEXT)),
|
||||
Span::styled("█", Style::new().fg(input::CURSOR)),
|
||||
])),
|
||||
rows[0],
|
||||
);
|
||||
@@ -95,13 +97,13 @@ impl<'a> FileBrowserModal<'a> {
|
||||
format!("{prefix}{name}")
|
||||
};
|
||||
let color = if is_selected {
|
||||
Color::Yellow
|
||||
browser::SELECTED
|
||||
} else if *is_dir {
|
||||
Color::Blue
|
||||
browser::DIRECTORY
|
||||
} else if *is_cagire {
|
||||
Color::Magenta
|
||||
browser::PROJECT_FILE
|
||||
} else {
|
||||
Color::White
|
||||
browser::FILE
|
||||
};
|
||||
Line::from(Span::styled(display, Style::new().fg(color)))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user