gui: fix layout with scrollbar for big windows

This commit is contained in:
edouard 2023-04-26 20:57:40 +02:00
parent 474adddc9c
commit e3db475be2

View File

@ -251,13 +251,17 @@ pub fn dashboard<'a, T: Into<Element<'a, Message>>>(
Column::new()
.push(warn(warning))
.push(
main_section(Container::new(scrollable(row!(
Container::new(scrollable(row!(
Space::with_width(Length::FillPortion(1)),
column!(Space::with_height(Length::Units(150)), content.into())
.width(Length::FillPortion(8)),
.width(Length::FillPortion(8))
.max_width(1500),
Space::with_width(Length::FillPortion(1)),
))))
.width(Length::Fill),
)))
.center_x()
.style(theme::Container::Background)
.width(Length::Fill)
.height(Length::Fill),
)
.width(Length::FillPortion(10)),
)
@ -266,14 +270,6 @@ pub fn dashboard<'a, T: Into<Element<'a, Message>>>(
.into()
}
fn main_section<'a, T: 'a>(menu: Container<'a, T>) -> Container<'a, T> {
Container::new(menu.max_width(1500))
.style(theme::Container::Background)
.center_x()
.width(Length::Fill)
.height(Length::Fill)
}
pub fn modal<'a, T: Into<Element<'a, Message>>, F: Into<Element<'a, Message>>>(
is_previous: bool,
warning: Option<&Error>,