Fixing color schemes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::theme::{nav, ui};
|
||||
use crate::theme;
|
||||
use ratatui::layout::{Alignment, Rect};
|
||||
use ratatui::style::Style;
|
||||
use ratatui::widgets::{Clear, Paragraph};
|
||||
@@ -50,11 +50,12 @@ impl<'a> NavMinimap<'a> {
|
||||
frame.render_widget(Clear, area);
|
||||
|
||||
// Fill background with theme color
|
||||
let t = theme::get();
|
||||
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)),
|
||||
Paragraph::new(bg_fill.clone()).style(Style::new().bg(t.ui.bg)),
|
||||
line_area,
|
||||
);
|
||||
}
|
||||
@@ -72,10 +73,11 @@ impl<'a> NavMinimap<'a> {
|
||||
}
|
||||
|
||||
fn render_tile(&self, frame: &mut Frame, area: Rect, label: &str, is_selected: bool) {
|
||||
let t = theme::get();
|
||||
let (bg, fg) = if is_selected {
|
||||
(nav::SELECTED_BG, nav::SELECTED_FG)
|
||||
(t.nav.selected_bg, t.nav.selected_fg)
|
||||
} else {
|
||||
(nav::UNSELECTED_BG, nav::UNSELECTED_FG)
|
||||
(t.nav.unselected_bg, t.nav.unselected_fg)
|
||||
};
|
||||
|
||||
// Fill background
|
||||
|
||||
Reference in New Issue
Block a user