feat: add different background color for inactive panes

This commit is contained in:
Ben LeFevre 2023-08-18 09:21:45 +10:00
parent a7651f5bf0
commit 7ffb76af21
2 changed files with 5 additions and 0 deletions

View File

@ -269,6 +269,7 @@ #### Interface
| Key | Notes |
| --- | --- |
| `ui.background` | |
| `ui.background.inactive` | Background of unfocused document |
| `ui.background.separator` | Picker separator below input line |
| `ui.cursor` | |
| `ui.cursor.normal` | |

View File

@ -98,6 +98,10 @@ pub fn render_view(
let text_annotations = view.text_annotations(doc, Some(theme));
let mut decorations = DecorationManager::default();
if !is_focused {
surface.set_style(area, theme.get("ui.background.inactive"))
}
if is_focused && config.cursorline {
decorations.add_decoration(Self::cursorline(doc, view, theme));
}