From aa44f877d920a7f5eb32f37b5cccc678c19829aa Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Thu, 2 Oct 2025 22:56:10 +0200 Subject: fix: sizing issues (collapsed dialog without user-defined size) --- src/dialog.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/dialog.rs b/src/dialog.rs index 73d7282..3796948 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -414,8 +414,16 @@ where has_buttons.then_some(vertical()), buttons, ]) - .width(self.width) - .height(self.height) + .width(if self.width == Length::Shrink && has_buttons { + Length::Fill + } else { + self.width + }) + .height(if self.height == Length::Shrink && has_buttons { + Length::Fill + } else { + self.height + }) .max_width(max_width) .max_height(max_height) .class(self.container_class) -- cgit v1.2.3