aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dialog.rs12
1 files 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)