mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-31 06:50:10 +00:00
Avoid showing selection strip on top of diagnostic headers
This commit is contained in:
parent
51c34ebcc2
commit
9b9fcf6927
2 changed files with 26 additions and 23 deletions
|
@ -855,7 +855,7 @@ impl Element for EditorElement {
|
||||||
layout: &mut Self::LayoutState,
|
layout: &mut Self::LayoutState,
|
||||||
cx: &mut PaintContext,
|
cx: &mut PaintContext,
|
||||||
) -> Self::PaintState {
|
) -> Self::PaintState {
|
||||||
if let Some(layout) = layout {
|
let layout = layout.as_mut()?;
|
||||||
cx.scene.push_layer(Some(bounds));
|
cx.scene.push_layer(Some(bounds));
|
||||||
|
|
||||||
let gutter_bounds = RectF::new(bounds.origin(), layout.gutter_size);
|
let gutter_bounds = RectF::new(bounds.origin(), layout.gutter_size);
|
||||||
|
@ -869,7 +869,12 @@ impl Element for EditorElement {
|
||||||
self.paint_gutter(gutter_bounds, visible_bounds, layout, cx);
|
self.paint_gutter(gutter_bounds, visible_bounds, layout, cx);
|
||||||
}
|
}
|
||||||
self.paint_text(text_bounds, visible_bounds, layout, cx);
|
self.paint_text(text_bounds, visible_bounds, layout, cx);
|
||||||
|
|
||||||
|
if !layout.blocks.is_empty() {
|
||||||
|
cx.scene.push_layer(Some(bounds));
|
||||||
self.paint_blocks(bounds, visible_bounds, layout, cx);
|
self.paint_blocks(bounds, visible_bounds, layout, cx);
|
||||||
|
cx.scene.pop_layer();
|
||||||
|
}
|
||||||
|
|
||||||
cx.scene.pop_layer();
|
cx.scene.pop_layer();
|
||||||
|
|
||||||
|
@ -878,9 +883,6 @@ impl Element for EditorElement {
|
||||||
gutter_bounds,
|
gutter_bounds,
|
||||||
text_bounds,
|
text_bounds,
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_event(
|
fn dispatch_event(
|
||||||
|
|
|
@ -258,6 +258,7 @@ path = { extends = "$text.2", size = 14, margin.left = 12 }
|
||||||
text_scale_factor = 0.857
|
text_scale_factor = 0.857
|
||||||
|
|
||||||
[editor.diagnostic_header]
|
[editor.diagnostic_header]
|
||||||
|
background = "$editor.background"
|
||||||
border = { width = 1, top = true, bottom = true, color = "$border.1" }
|
border = { width = 1, top = true, bottom = true, color = "$border.1" }
|
||||||
code = { extends = "$text.2", size = 14, margin.left = 10 }
|
code = { extends = "$text.2", size = 14, margin.left = 10 }
|
||||||
icon_width_factor = 1.5
|
icon_width_factor = 1.5
|
||||||
|
|
Loading…
Reference in a new issue