Fix Popup modal mouse move crossed to back layer. (#51)
This commit is contained in:
parent
e3a49f20ca
commit
ca08be7038
2 changed files with 8 additions and 7 deletions
|
|
@ -39,11 +39,11 @@ fn main() {
|
|||
|
||||
cx.set_menus(vec![
|
||||
Menu {
|
||||
name: "GPUI App",
|
||||
name: "GPUI App".into(),
|
||||
items: vec![MenuItem::action("Quit", Quit)],
|
||||
},
|
||||
Menu {
|
||||
name: "Edit",
|
||||
name: "Edit".into(),
|
||||
items: vec![MenuItem::action("Copy", Copy)],
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use gpui::{
|
||||
div, prelude::FluentBuilder as _, px, FocusHandle, FocusableView, InteractiveElement as _,
|
||||
IntoElement, ParentElement, Render, Styled, View, ViewContext, VisualContext as _, WeakView,
|
||||
WindowContext,
|
||||
deferred, div, prelude::FluentBuilder as _, px, FocusHandle, FocusableView,
|
||||
InteractiveElement as _, IntoElement, ParentElement, Render, Styled, View, ViewContext,
|
||||
VisualContext as _, WeakView, WindowContext,
|
||||
};
|
||||
|
||||
use ui::{
|
||||
|
|
@ -208,10 +208,11 @@ impl Render for PickerStory {
|
|||
)
|
||||
})
|
||||
.when(self.open, |this| {
|
||||
this.child(
|
||||
this.child(deferred(
|
||||
div().absolute().size_full().top_0().left_0().child(
|
||||
v_flex().flex().flex_col().items_center().child(
|
||||
v_flex()
|
||||
.occlude()
|
||||
.w(px(450.))
|
||||
.h(px(350.))
|
||||
.elevation_3(cx)
|
||||
|
|
@ -222,7 +223,7 @@ impl Render for PickerStory {
|
|||
})),
|
||||
),
|
||||
),
|
||||
)
|
||||
))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue