mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
Touch up render function
This commit is contained in:
parent
6844bb6510
commit
e32aa95092
1 changed files with 7 additions and 9 deletions
|
@ -81,17 +81,15 @@ impl RichText {
|
|||
}),
|
||||
);
|
||||
}
|
||||
if region.background_kind == Some(BackgroundKind::Code) {
|
||||
if let Some(region_kind) = ®ion.background_kind {
|
||||
let background = match region_kind {
|
||||
BackgroundKind::Code => code_span_background_color,
|
||||
BackgroundKind::Mention => self_mention_span_background_color,
|
||||
}
|
||||
.into();
|
||||
cx.scene().push_quad(gpui::Quad {
|
||||
bounds,
|
||||
background: Some(code_span_background_color),
|
||||
border: Default::default(),
|
||||
corner_radii: (2.0).into(),
|
||||
});
|
||||
} else if region.background_kind == Some(BackgroundKind::Mention) {
|
||||
cx.scene().push_quad(gpui::Quad {
|
||||
bounds,
|
||||
background: Some(self_mention_span_background_color),
|
||||
background,
|
||||
border: Default::default(),
|
||||
corner_radii: (2.0).into(),
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue