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
|
|
@ -153,7 +153,7 @@ mod rainbow {
|
|||
}
|
||||
|
||||
use iced::widget::{column, container, scrollable};
|
||||
use iced::Element;
|
||||
use iced::{Element, Length};
|
||||
use rainbow::rainbow;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
|
|
@ -176,7 +176,7 @@ fn view(_state: &()) -> Element<'_, ()> {
|
|||
.spacing(20)
|
||||
.max_width(500);
|
||||
|
||||
let scrollable = scrollable(container(content).center_x());
|
||||
let scrollable = scrollable(container(content).center_x(Length::Fill));
|
||||
|
||||
container(scrollable).center_y().into()
|
||||
container(scrollable).center_y(Length::Fill).into()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue