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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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