mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Fix: Adapt code to use the merged PR's bg_color() method instead of direct background field access
This commit is contained in:
parent
216903f57a
commit
b51c2e5fb6
3 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue