From 2b67bb27cf87650b25f7ae25f43539dba10f3b77 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 11 Mar 2024 18:12:24 +0100 Subject: [PATCH] Occlude only modal and not the space around it used to center it --- crates/workspace/src/modal_layer.rs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/crates/workspace/src/modal_layer.rs b/crates/workspace/src/modal_layer.rs index 8208d808e9..f64df94cae 100644 --- a/crates/workspace/src/modal_layer.rs +++ b/crates/workspace/src/modal_layer.rs @@ -139,21 +139,15 @@ impl Render for ModalLayer { return div(); }; - div() - .occlude() - .absolute() - .size_full() - .top_0() - .left_0() - .child( - v_flex() - .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())), - ) + div().absolute().size_full().top_0().left_0().child( + v_flex() + .h(px(0.0)) + .top_20() + .flex() + .flex_col() + .items_center() + .track_focus(&active_modal.focus_handle) + .child(h_flex().occlude().child(active_modal.modal.view())), + ) } }