mirror of https://github.com/lapce/lapce.git
Merge pull request #355 from PhilipDaniels/terminal_painting
Make terminal paint in proper background color
This commit is contained in:
commit
e2edd74690
|
@ -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<LapceIcon>,
|
||||
|
@ -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
|
||||
|
|
|
@ -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<LapceTabData, LapceSplitNew>,
|
||||
|
@ -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),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue