Fix cross calculation in layout::flex

This commit is contained in:
Héctor Ramón Jiménez 2024-01-09 07:15:57 +01:00
parent 025064c9e0
commit 88f8c343fa
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 16 additions and 22 deletions

View file

@ -1,4 +1,4 @@
use iced::widget::{column, container, pick_list, scrollable, vertical_space};
use iced::widget::{column, pick_list, scrollable, vertical_space};
use iced::{Alignment, Element, Length, Sandbox, Settings};
pub fn main() -> iced::Result {
@ -48,15 +48,11 @@ impl Sandbox for Example {
pick_list,
vertical_space(600),
]
.width(Length::Fill)
.align_items(Alignment::Center)
.spacing(10);
container(scrollable(content))
.width(Length::Fill)
.height(Length::Fill)
.center_x()
.center_y()
.into()
scrollable(content).into()
}
}