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) }