diff --git a/egui/src/containers/frame.rs b/egui/src/containers/frame.rs index 169f6057..a81710bc 100644 --- a/egui/src/containers/frame.rs +++ b/egui/src/containers/frame.rs @@ -103,6 +103,22 @@ impl Frame { self } + pub fn corner_radius(mut self, corner_radius: f32) -> Self { + self.corner_radius = corner_radius; + self + } + + /// Margin on each side of the frame. + pub fn margin(mut self, margin: impl Into) -> Self { + self.margin = margin.into(); + self + } + + pub fn shadow(mut self, shadow: Shadow) -> Self { + self.shadow = shadow; + self + } + pub fn multiply_with_opacity(mut self, opacity: f32) -> Self { self.fill = self.fill.linear_multiply(opacity); self.stroke.color = self.stroke.color.linear_multiply(opacity);