mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Add ui.statusline.inactive
, use ui.statusline
for statusline text
This commit is contained in:
parent
b0522239e7
commit
1c1474c3b8
@ -31,7 +31,8 @@
|
||||
"ui.background" = { bg = "#161c23" }
|
||||
"ui.linenr" = { fg = "#415367" }
|
||||
"ui.linenr.selected" = { fg = "#e5ded6" } # TODO
|
||||
"ui.statusline" = { bg = "#232d38" }
|
||||
"ui.statusline" = { fg = "#e5ded6", bg = "#232d38" }
|
||||
"ui.statusline.inactive" = { fg = "#c6b8ad", bg = "#232d38" }
|
||||
"ui.popup" = { bg = "#232d38" }
|
||||
"ui.window" = { bg = "#232d38" }
|
||||
"ui.help" = { bg = "#232d38", fg = "#e5ded6" }
|
||||
@ -39,7 +40,7 @@
|
||||
"ui.text" = { fg = "#e5ded6" }
|
||||
"ui.text.focus" = { fg = "#e5ded6", modifiers= ["bold"] }
|
||||
|
||||
"ui.selection" = { bg = "#540099" }
|
||||
"ui.selection" = { bg = "#313f4e" }
|
||||
"ui.menu.selected" = { fg = "#e5ded6", bg = "#313f4e" }
|
||||
|
||||
"warning" = "#dc7759"
|
||||
|
@ -31,7 +31,8 @@
|
||||
"ui.background" = { bg = "#FFFCFD" }
|
||||
"ui.linenr" = { fg = "#bbbbbb" }
|
||||
"ui.linenr.selected" = { fg = "#F3EAE9" } # TODO
|
||||
"ui.statusline" = { bg = "#F3EAE9" }
|
||||
"ui.statusline" = { fg = "#250E07", bg = "#F3EAE9" }
|
||||
"ui.statusline.inactive" = { fg = "#7b91b3", bg = "#F3EAE9" }
|
||||
"ui.popup" = { bg = "#F3EAE9" }
|
||||
"ui.window" = { bg = "#D8B8B3" }
|
||||
"ui.help" = { bg = "#D8B8B3", fg = "#250E07" }
|
||||
|
@ -36,6 +36,7 @@
|
||||
"ui.linenr.selected" = { fg = "#ABB2BF" }
|
||||
"ui.popup" = { bg = "#3E4452" }
|
||||
"ui.statusline" = { fg = "#ABB2BF", bg = "#2C323C" }
|
||||
"ui.statusline.inactive" = { fg = "#ABB2Bf", bg = "#2C323C" }
|
||||
"ui.selection" = { bg = "#3E4452" }
|
||||
"ui.text" = { fg = "#ABB2BF", bg = "#282C34" }
|
||||
"ui.text.focus" = { fg = "#ABB2BF", bg = "#2C323C", modifiers = ['bold'] }
|
||||
|
@ -476,18 +476,15 @@ pub fn render_statusline(
|
||||
Mode::Select => "SEL",
|
||||
Mode::Normal => "NOR",
|
||||
};
|
||||
let text_color = if is_focused {
|
||||
theme.get("ui.text.focus")
|
||||
let style = if is_focused {
|
||||
theme.get("ui.statusline")
|
||||
} else {
|
||||
theme.get("ui.text")
|
||||
theme.get("ui.statusline.inactive")
|
||||
};
|
||||
// statusline
|
||||
surface.set_style(
|
||||
Rect::new(viewport.x, viewport.y, viewport.width, 1),
|
||||
theme.get("ui.statusline"),
|
||||
);
|
||||
surface.set_style(Rect::new(viewport.x, viewport.y, viewport.width, 1), style);
|
||||
if is_focused {
|
||||
surface.set_string(viewport.x + 1, viewport.y, mode, text_color);
|
||||
surface.set_string(viewport.x + 1, viewport.y, mode, style);
|
||||
}
|
||||
|
||||
if let Some(path) = doc.relative_path() {
|
||||
@ -499,7 +496,7 @@ pub fn render_statusline(
|
||||
viewport.y,
|
||||
title,
|
||||
viewport.width.saturating_sub(6) as usize,
|
||||
text_color,
|
||||
style,
|
||||
);
|
||||
}
|
||||
|
||||
@ -538,7 +535,7 @@ pub fn render_statusline(
|
||||
viewport.x + viewport.width.saturating_sub(text_len),
|
||||
viewport.y,
|
||||
right_side_text,
|
||||
text_color,
|
||||
style,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,8 @@
|
||||
"ui.background" = { bg = "#3b224c" } # midnight
|
||||
"ui.linenr" = { fg = "#5a5977" } # comet
|
||||
"ui.linenr.selected" = { fg = "#dbbfef" } # lilac
|
||||
"ui.statusline" = { bg = "#281733" } # revolver
|
||||
"ui.statusline" = { fg = "#dbbfef", bg = "#281733" } # revolver
|
||||
"ui.statusline.inactive" = { fg = "#a4a0e8", bg = "#281733" } # revolver
|
||||
"ui.popup" = { bg = "#281733" } # revolver
|
||||
"ui.window" = { bg = "#452859" } # bossa nova
|
||||
"ui.window" = { bg = "#452859" } # bossa nova
|
||||
|
Loading…
Reference in New Issue
Block a user