diff --git a/crates/ui/src/modal.rs b/crates/ui/src/modal.rs index 4c2061f6..793a070a 100644 --- a/crates/ui/src/modal.rs +++ b/crates/ui/src/modal.rs @@ -473,10 +473,13 @@ impl RenderOnce for Modal { ) }) .children(self.show_close.then(|| { + let top = (paddings.top - px(10.)).max(px(8.)); + let right = (paddings.right - px(10.)).max(px(8.)); + Button::new("close") .absolute() - .top(paddings.top - px(3.)) - .right(paddings.right - px(3.)) + .top(top) + .right(right) .small() .ghost() .icon(IconName::Close)