From 311abe07fe600a098c009904878785f69346b350 Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Thu, 29 Aug 2024 16:19:29 +0800 Subject: [PATCH] Reduce `Popover` pop-up margin (#187) --- crates/ui/src/popover.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui/src/popover.rs b/crates/ui/src/popover.rs index fe3f2540..b351a500 100644 --- a/crates/ui/src/popover.rs +++ b/crates/ui/src/popover.rs @@ -239,9 +239,11 @@ impl Element for Popover { .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())