mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
feat: unobtrusive statusline highlight bg surface
This commit is contained in:
parent
d9727082b3
commit
84c8c75245
@ -56,9 +56,17 @@ pub fn render(context: &mut RenderContext, viewport: Rect, surface: &mut Surface
|
|||||||
context.editor.theme.get("ui.statusline.inactive")
|
context.editor.theme.get("ui.statusline.inactive")
|
||||||
};
|
};
|
||||||
|
|
||||||
if !unobtrusive_statusline {
|
let surface_style = if unobtrusive_statusline {
|
||||||
surface.set_style(viewport.with_height(1), base_style);
|
let surface_bg = match base_style.bg {
|
||||||
}
|
Some(color) => color,
|
||||||
|
None => helix_view::theme::Color::Reset
|
||||||
|
};
|
||||||
|
Style::default().bg(surface_bg)
|
||||||
|
} else {
|
||||||
|
base_style
|
||||||
|
};
|
||||||
|
|
||||||
|
surface.set_style(viewport.with_height(1), surface_style);
|
||||||
|
|
||||||
let write_left = |context: &mut RenderContext, text, style| {
|
let write_left = |context: &mut RenderContext, text, style| {
|
||||||
append(&mut context.parts.left, text, &base_style, style)
|
append(&mut context.parts.left, text, &base_style, style)
|
||||||
|
Loading…
Reference in New Issue
Block a user