Monster commit: native version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::theme::{nav, ui};
|
||||
use ratatui::layout::{Alignment, Rect};
|
||||
use ratatui::style::{Color, Style};
|
||||
use ratatui::style::Style;
|
||||
use ratatui::widgets::{Clear, Paragraph};
|
||||
use ratatui::Frame;
|
||||
|
||||
@@ -48,6 +49,16 @@ impl<'a> NavMinimap<'a> {
|
||||
|
||||
frame.render_widget(Clear, area);
|
||||
|
||||
// Fill background with theme color
|
||||
let bg_fill = " ".repeat(area.width as usize);
|
||||
for row in 0..area.height {
|
||||
let line_area = Rect::new(area.x, area.y + row, area.width, 1);
|
||||
frame.render_widget(
|
||||
Paragraph::new(bg_fill.clone()).style(Style::new().bg(ui::BG)),
|
||||
line_area,
|
||||
);
|
||||
}
|
||||
|
||||
let inner_x = area.x + pad;
|
||||
let inner_y = area.y + pad;
|
||||
|
||||
@@ -62,9 +73,9 @@ impl<'a> NavMinimap<'a> {
|
||||
|
||||
fn render_tile(&self, frame: &mut Frame, area: Rect, label: &str, is_selected: bool) {
|
||||
let (bg, fg) = if is_selected {
|
||||
(Color::Rgb(50, 90, 110), Color::White)
|
||||
(nav::SELECTED_BG, nav::SELECTED_FG)
|
||||
} else {
|
||||
(Color::Rgb(30, 35, 45), Color::Rgb(100, 105, 115))
|
||||
(nav::UNSELECTED_BG, nav::UNSELECTED_FG)
|
||||
};
|
||||
|
||||
// Fill background
|
||||
|
||||
Reference in New Issue
Block a user