Fix a few regressions related to the flicker fix (#9190)
This pull request fixes https://github.com/zed-industries/zed/issues/9187 and fixes also ix a rendering problem that would show cursors on the same plane:  Release Notes: - N/A
This commit is contained in:
parent
b4ddc83e85
commit
91a0923fc4
2 changed files with 19 additions and 15 deletions
|
@ -2083,11 +2083,9 @@ impl EditorElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint_cursors(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {
|
fn paint_cursors(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {
|
||||||
cx.paint_layer(layout.text_hitbox.bounds, |cx| {
|
for cursor in &mut layout.cursors {
|
||||||
for cursor in &mut layout.cursors {
|
cursor.paint(layout.content_origin, cx);
|
||||||
cursor.paint(layout.content_origin, cx);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint_scrollbar(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {
|
fn paint_scrollbar(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {
|
||||||
|
|
|
@ -139,15 +139,21 @@ impl Render for ModalLayer {
|
||||||
return div();
|
return div();
|
||||||
};
|
};
|
||||||
|
|
||||||
div().absolute().size_full().top_0().left_0().child(
|
div()
|
||||||
v_flex()
|
.occlude()
|
||||||
.h(px(0.0))
|
.absolute()
|
||||||
.top_20()
|
.size_full()
|
||||||
.flex()
|
.top_0()
|
||||||
.flex_col()
|
.left_0()
|
||||||
.items_center()
|
.child(
|
||||||
.track_focus(&active_modal.focus_handle)
|
v_flex()
|
||||||
.child(h_flex().child(active_modal.modal.view())),
|
.h(px(0.0))
|
||||||
)
|
.top_20()
|
||||||
|
.flex()
|
||||||
|
.flex_col()
|
||||||
|
.items_center()
|
||||||
|
.track_focus(&active_modal.focus_handle)
|
||||||
|
.child(h_flex().child(active_modal.modal.view())),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue