Skip to content

Commit

Permalink
info component style config use ui.info ui.info.text (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
cossonleo authored Aug 24, 2021
1 parent 1d45f50 commit 490125f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helix-term/src/ui/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ use tui::widgets::{Block, Borders, Paragraph, Widget};

impl Component for Info {
fn render(&mut self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
let text_style = cx.editor.theme.get("ui.text.focus");
let popup_style = text_style.patch(cx.editor.theme.get("ui.popup"));
let get_theme = |style, fallback| {
let theme = &cx.editor.theme;
theme.try_get(style).unwrap_or_else(|| theme.get(fallback))
};
let text_style = get_theme("ui.info.text", "ui.text");
let popup_style = text_style.patch(get_theme("ui.info", "ui.popup"));

// Calculate the area of the terminal to modify. Because we want to
// render at the bottom right, we use the viewport's width and height
Expand Down

0 comments on commit 490125f

Please sign in to comment.