which.block: Color -> Style

This commit is contained in:
Yifan Song 2023-09-27 12:54:00 +02:00 committed by sxyazi
parent 6c2afde49f
commit 85a83ff731
No known key found for this signature in database

View file

@ -1,5 +1,5 @@
use config::THEME; use config::THEME;
use ratatui::{layout, prelude::{Buffer, Constraint, Direction, Rect}, style::Style, widgets::{Block, Clear, Widget}}; use ratatui::{layout, prelude::{Buffer, Constraint, Direction, Rect}, widgets::{Block, Clear, Widget}};
use super::Side; use super::Side;
use crate::Ctx; use crate::Ctx;
@ -41,7 +41,7 @@ impl Widget for Which<'_> {
.split(area); .split(area);
Clear.render(area, buf); Clear.render(area, buf);
Block::new().style(Style::new().bg(*THEME.which.block)).render(area, buf); Block::new().style(THEME.which.block.get()).render(area, buf);
Side::new(which.times, cands.0).render(chunks[0], buf); Side::new(which.times, cands.0).render(chunks[0], buf);
Side::new(which.times, cands.1).render(chunks[1], buf); Side::new(which.times, cands.1).render(chunks[1], buf);
Side::new(which.times, cands.2).render(chunks[2], buf); Side::new(which.times, cands.2).render(chunks[2], buf);