1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix: Popup incorrectly calculates possible min width of popup causing panic (#5208)

Fix: Popup incorrectly calculates possible min width of popup causing
panic

* Closes #5206
This commit is contained in:
rustbasic
2024-10-29 20:43:05 +09:00
committed by GitHub
parent c7d46ac9f9
commit 926799a167

View File

@@ -407,7 +407,7 @@ pub fn popup_above_or_below_widget<R>(
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