@@ -6,14 +6,19 @@ use tui::widgets::{Block, Borders, Widget};
7impl Component for Info {
7impl Component for Info {
8 fn render(&self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
8 fn render(&self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
9+ let style = cx.editor.theme.get("ui.popup");
10+ let block = Block::default()
9− let block = Block::default().title(self.title).borders(Borders::ALL);
12+ .borders(Borders::ALL)
13+ .border_style(style);
10 let Info { width, height, .. } = self;
14 let Info { width, height, .. } = self;
11 let (w, h) = (*width + 2, *height + 2);
15 let (w, h) = (*width + 2, *height + 2);
12 // -2 to subtract command line + statusline. a bit of a hack, because of splits.
16 // -2 to subtract command line + statusline. a bit of a hack, because of splits.
13 let area = Rect::new(viewport.width - w, viewport.height - h - 2, w, h);
17 let area = Rect::new(viewport.width - w, viewport.height - h - 2, w, h);
18+ surface.clear_with(area, style);
14 let Rect { x, y, .. } = block.inner(area);
19 let Rect { x, y, .. } = block.inner(area);
15 for (y, line) in (y..).zip(self.text.lines()) {
20 for (y, line) in (y..).zip(self.text.lines()) {
16− surface.set_string(x, y, line, Style::default());
21+ surface.set_string(x, y, line, style);
18 block.render(area, surface);
23 block.render(area, surface);