modal: Update modal inner padding from p_4 to p_6.

This commit is contained in:
Jason Lee 2025-06-20 18:16:35 +08:00
parent 35623f47d7
commit fdeb46b293

View file

@ -355,8 +355,8 @@ impl RenderOnce for Modal {
let x = bounds.center().x - self.width / 2.; let x = bounds.center().x - self.width / 2.;
let border_radius = (cx.theme().radius * 2.).min(px(20.)); let border_radius = (cx.theme().radius * 2.).min(px(20.));
let mut padding_right = px(16.); let mut padding_right = px(24.);
let mut padding_left = px(16.); let mut padding_left = px(24.);
if let Some(pl) = self.style.padding.left { if let Some(pl) = self.style.padding.left {
padding_left = pl.to_pixels(self.width.into(), window.rem_size()); padding_left = pl.to_pixels(self.width.into(), window.rem_size());
} }
@ -400,7 +400,7 @@ impl RenderOnce for Modal {
.rounded(border_radius) .rounded(border_radius)
.shadow_xl() .shadow_xl()
.min_h_24() .min_h_24()
.py_4() .py_6()
.gap_4() .gap_4()
.refine_style(&self.style) .refine_style(&self.style)
.px_0() .px_0()
@ -458,8 +458,8 @@ impl RenderOnce for Modal {
this.child( this.child(
Button::new("close") Button::new("close")
.absolute() .absolute()
.top_2() .top_4()
.right_2() .right_4()
.small() .small()
.ghost() .ghost()
.icon(IconName::Close) .icon(IconName::Close)