Ask for explicit Length in center_* methods
This commit is contained in:
parent
b30d34f728
commit
05f69f495e
13 changed files with 40 additions and 41 deletions
|
|
@ -83,9 +83,10 @@ where
|
|||
///
|
||||
/// This is equivalent to:
|
||||
/// ```rust,no_run
|
||||
/// # use iced_widget::core::Length;
|
||||
/// # use iced_widget::Container;
|
||||
/// # fn container<A>(x: A) -> Container<'static, ()> { unreachable!() }
|
||||
/// let centered = container("Centered!").center();
|
||||
/// let centered = container("Centered!").center(Length::Fill);
|
||||
/// ```
|
||||
///
|
||||
/// [`Container`]: crate::Container
|
||||
|
|
@ -96,7 +97,7 @@ where
|
|||
Theme: container::Catalog + 'a,
|
||||
Renderer: core::Renderer,
|
||||
{
|
||||
container(content).fill().center()
|
||||
container(content).center(Length::Fill)
|
||||
}
|
||||
|
||||
/// Creates a new [`Column`] with the given children.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue