Fix: Adapt code to use the merged PR's bg_color() method instead of direct background field access

This commit is contained in:
Carlos de Paula 2025-11-12 11:55:32 -03:00
parent 216903f57a
commit b51c2e5fb6
3 changed files with 5 additions and 4 deletions

View file

@ -1 +1 @@
yazi_macro::mod_flat!(align area bar border cell clear constraint edge elements gauge layout line list pad pos rect renderable row span table text wrap);
yazi_macro::mod_flat!(align area bar block border cell clear constraint edge elements gauge layout line list pad pos rect renderable row span table text wrap);

View file

@ -152,8 +152,9 @@ impl Widget for Root<'_> {
// Fill background on all cells to create an opaque background (like fzf does).
// This is done AFTER all rendering so text/foreground colors are already set.
if !THEME.app.background.is_empty() {
if let Ok(bg_color) = THEME.app.background.parse::<ratatui::style::Color>() {
let bg_color_str = THEME.app.bg_color();
if !bg_color_str.is_empty() {
if let Ok(bg_color) = bg_color_str.parse::<ratatui::style::Color>() {
// When using app-wide background, fill everything including borders
for y in area.top()..area.bottom() {
for x in area.left()..area.right() {

View file

@ -23,7 +23,7 @@ impl Term {
last_area: Default::default(),
last_buffer: Default::default(),
};
let background = &THEME.app.background;
let background = THEME.app.bg_color();
enable_raw_mode()?;
static FIRST: SyncCell<bool> = SyncCell::new(false);