Fix inconsistent align_* methods in Container

This commit is contained in:
Héctor Ramón Jiménez 2024-07-12 18:18:04 +02:00
parent 76737351ea
commit 915c926c28
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -138,12 +138,12 @@ where
}
/// Aligns the contents of the [`Container`] to the top.
pub fn align_top(self, height: Length) -> Self {
pub fn align_top(self, height: impl Into<Length>) -> Self {
self.height(height).align_y(alignment::Vertical::Top)
}
/// Aligns the contents of the [`Container`] to the bottom.
pub fn align_bottom(self, height: Length) -> Self {
pub fn align_bottom(self, height: impl Into<Length>) -> Self {
self.height(height).align_y(alignment::Vertical::Bottom)
}