From d51c7bcaab8659f8aee3f4dceb0196c86fd80468 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:19:49 +0900 Subject: [PATCH] Update popup.rs --- crates/egui/src/containers/popup.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/containers/popup.rs b/crates/egui/src/containers/popup.rs index 45304245ca4..56e3c44b150 100644 --- a/crates/egui/src/containers/popup.rs +++ b/crates/egui/src/containers/popup.rs @@ -407,7 +407,7 @@ pub fn popup_above_or_below_widget( let frame = Frame::popup(parent_ui.style()); let frame_margin = frame.total_margin(); - let inner_width = widget_response.rect.width() - frame_margin.sum().x; + let inner_width = (widget_response.rect.width() - frame_margin.sum().x).max(0.0); parent_ui.ctx().pass_state_mut(|fs| { fs.layers