Change help prompt styling
This commit is contained in:
parent
d8e16554bf
commit
a2147fc7d5
2 changed files with 9 additions and 9 deletions
|
@ -111,6 +111,7 @@ impl Prompt {
|
||||||
pub fn render_prompt(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
pub fn render_prompt(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
||||||
let theme = &cx.editor.theme;
|
let theme = &cx.editor.theme;
|
||||||
let text_color = theme.get("ui.text.focus");
|
let text_color = theme.get("ui.text.focus");
|
||||||
|
let selected_color = theme.get("ui.menu.selected");
|
||||||
// completion
|
// completion
|
||||||
|
|
||||||
let max_col = area.width / BASE_WIDTH;
|
let max_col = area.width / BASE_WIDTH;
|
||||||
|
@ -133,7 +134,8 @@ impl Prompt {
|
||||||
|
|
||||||
for (i, (_range, completion)) in self.completion.iter().enumerate() {
|
for (i, (_range, completion)) in self.completion.iter().enumerate() {
|
||||||
let color = if Some(i) == self.selection {
|
let color = if Some(i) == self.selection {
|
||||||
Style::default().bg(Color::Rgb(104, 60, 232))
|
// Style::default().bg(Color::Rgb(104, 60, 232))
|
||||||
|
selected_color // TODO: just invert bg
|
||||||
} else {
|
} else {
|
||||||
text_color
|
text_color
|
||||||
};
|
};
|
||||||
|
@ -158,14 +160,9 @@ impl Prompt {
|
||||||
if let Some(doc) = (self.doc_fn)(&self.line) {
|
if let Some(doc) = (self.doc_fn)(&self.line) {
|
||||||
let text = ui::Text::new(doc.to_string());
|
let text = ui::Text::new(doc.to_string());
|
||||||
|
|
||||||
let area = Rect::new(
|
let area = Rect::new(completion_area.x, completion_area.y - 3, BASE_WIDTH * 3, 3);
|
||||||
completion_area.x,
|
|
||||||
completion_area.y - 3,
|
|
||||||
completion_area.width,
|
|
||||||
3,
|
|
||||||
);
|
|
||||||
|
|
||||||
let background = theme.get("ui.window");
|
let background = theme.get("ui.help");
|
||||||
surface.clear_with(area, background);
|
surface.clear_with(area, background);
|
||||||
|
|
||||||
use tui::layout::Margin;
|
use tui::layout::Margin;
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
"ui.statusline" = { bg = "#281733" } # revolver
|
"ui.statusline" = { bg = "#281733" } # revolver
|
||||||
"ui.popup" = { bg = "#281733" } # revolver
|
"ui.popup" = { bg = "#281733" } # revolver
|
||||||
"ui.window" = { bg = "#452859" } # bossa nova
|
"ui.window" = { bg = "#452859" } # bossa nova
|
||||||
|
"ui.window" = { bg = "#452859" } # bossa nova
|
||||||
|
"ui.help" = { bg = "#6F44F0", fg = "#a4a0e8" }
|
||||||
|
"ui.help" = { bg = "#7958DC", fg = "#171452" }
|
||||||
|
|
||||||
"ui.text" = { fg = "#a4a0e8" } # lavender
|
"ui.text" = { fg = "#a4a0e8" } # lavender
|
||||||
"ui.text.focus" = { fg = "#dbbfef"} # lilac
|
"ui.text.focus" = { fg = "#dbbfef"} # lilac
|
||||||
|
|
Loading…
Reference in a new issue