Reduce Popover pop-up margin (#187)

This commit is contained in:
Floyd Wang 2024-08-29 16:19:29 +08:00 committed by GitHub
parent 7286866afd
commit 311abe07fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -239,9 +239,11 @@ impl<M: ManagedView> Element for Popover<M> {
.occlude()
.when(!no_style, |this| this.popover_style(cx))
.map(|this| match anchor {
AnchorCorner::TopLeft | AnchorCorner::TopRight => this.top_2(),
AnchorCorner::TopLeft | AnchorCorner::TopRight => {
this.top_1p5()
}
AnchorCorner::BottomLeft | AnchorCorner::BottomRight => {
this.bottom_2()
this.bottom_1p5()
}
})
.child(content_view.clone())