mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -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:
@@ -407,7 +407,7 @@ pub fn popup_above_or_below_widget<R>(
|
|||||||
|
|
||||||
let frame = Frame::popup(parent_ui.style());
|
let frame = Frame::popup(parent_ui.style());
|
||||||
let frame_margin = frame.total_margin();
|
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| {
|
parent_ui.ctx().pass_state_mut(|fs| {
|
||||||
fs.layers
|
fs.layers
|
||||||
|
|||||||
Reference in New Issue
Block a user