From 6ecf7da43a9da7070648e0be0bb21b5cf7690122 Mon Sep 17 00:00:00 2001 From: JL710 <76447362+JL710@users.noreply.github.com> Date: Sun, 30 Mar 2025 12:42:38 +0200 Subject: [PATCH] improve center/align docs of container --- widget/src/container.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/widget/src/container.rs b/widget/src/container.rs index 82774186..3a09c040 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -153,8 +153,8 @@ where self.height(height).align_y(alignment::Vertical::Center) } - /// Centers the contents in both the horizontal and vertical axes of the - /// [`Container`]. + /// Sets the width and height of the [`Container`] and centers its contents in + /// both the horizontal and vertical axes. /// /// This is equivalent to chaining [`center_x`] and [`center_y`]. /// @@ -166,22 +166,22 @@ where self.center_x(length).center_y(length) } - /// Aligns the contents of the [`Container`] to the left. + /// Sets the width of the [`Container`] and aligns its contents to the left. pub fn align_left(self, width: impl Into) -> Self { self.width(width).align_x(alignment::Horizontal::Left) } - /// Aligns the contents of the [`Container`] to the right. + /// Sets the width of the [`Container`] and aligns its contents to the right. pub fn align_right(self, width: impl Into) -> Self { self.width(width).align_x(alignment::Horizontal::Right) } - /// Aligns the contents of the [`Container`] to the top. + /// Sets the height of the [`Container`] and aligns its contents to the top. pub fn align_top(self, height: impl Into) -> Self { self.height(height).align_y(alignment::Vertical::Top) } - /// Aligns the contents of the [`Container`] to the bottom. + /// Sets the height of the [`Container`] and aligns its contents to the bottom. pub fn align_bottom(self, height: impl Into) -> Self { self.height(height).align_y(alignment::Vertical::Bottom) }