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 {
|
pub struct PanelMainHeader {
|
||||||
text: String,
|
text: String,
|
||||||
icons: Vec<LapceIcon>,
|
icons: Vec<LapceIcon>,
|
||||||
|
@ -517,6 +519,7 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, _env: &Env) {
|
||||||
data.config
|
data.config
|
||||||
.get_color_unchecked(LapceTheme::LAPCE_DROPDOWN_SHADOW),
|
.get_color_unchecked(LapceTheme::LAPCE_DROPDOWN_SHADOW),
|
||||||
);
|
);
|
||||||
|
|
||||||
ctx.fill(
|
ctx.fill(
|
||||||
rect,
|
rect,
|
||||||
data.config
|
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 {
|
pub struct TerminalPanel {
|
||||||
widget_id: WidgetId,
|
widget_id: WidgetId,
|
||||||
split: WidgetPod<LapceTabData, LapceSplitNew>,
|
split: WidgetPod<LapceTabData, LapceSplitNew>,
|
||||||
|
@ -189,6 +191,11 @@ fn layout(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, env: &Env) {
|
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);
|
self.split.paint(ctx, data, env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,7 +296,7 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, env: &Env) {
|
||||||
ctx.fill(
|
ctx.fill(
|
||||||
rect,
|
rect,
|
||||||
data.config
|
data.config
|
||||||
.get_color_unchecked(LapceTheme::EDITOR_BACKGROUND),
|
.get_color_unchecked(LapceTheme::TERMINAL_BACKGROUND),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue