diff --git a/lapce-ui/src/panel.rs b/lapce-ui/src/panel.rs index 6654d0dc..25211b33 100644 --- a/lapce-ui/src/panel.rs +++ b/lapce-ui/src/panel.rs @@ -345,6 +345,8 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, _env: &Env) { } } +/// This struct is used as the outer container for a panel, +/// it contains the heading such as "Terminal" or "File Explorer". pub struct PanelMainHeader { text: String, icons: Vec, @@ -517,6 +519,7 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, _env: &Env) { data.config .get_color_unchecked(LapceTheme::LAPCE_DROPDOWN_SHADOW), ); + ctx.fill( rect, data.config diff --git a/lapce-ui/src/terminal.rs b/lapce-ui/src/terminal.rs index 17b8d0e8..709c23c7 100644 --- a/lapce-ui/src/terminal.rs +++ b/lapce-ui/src/terminal.rs @@ -84,6 +84,8 @@ pub fn new( } } +/// This struct represents the main body of the terminal, i.e. the part +/// where the shell is presented. pub struct TerminalPanel { widget_id: WidgetId, split: WidgetPod, @@ -189,6 +191,11 @@ fn layout( } fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, env: &Env) { + let rect = ctx.size().to_rect(); + ctx.fill( + rect, + data.config.get_color_unchecked(LapceTheme::TERMINAL_BACKGROUND), + ); self.split.paint(ctx, data, env); } } @@ -289,7 +296,7 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, env: &Env) { ctx.fill( rect, data.config - .get_color_unchecked(LapceTheme::EDITOR_BACKGROUND), + .get_color_unchecked(LapceTheme::TERMINAL_BACKGROUND), ); });