layout of main window is getting closer

This commit is contained in:
Chris Cochrun 2024-11-22 11:44:04 -06:00
parent 102cba5dd5
commit 9031d15678

View file

@ -446,22 +446,24 @@ impl cosmic::Application for App {
))
};
let slide_preview = Container::new(
column![
let slide_preview = column![
Space::with_height(Length::Fill),
Responsive::new(|size| {
debug!(?size);
let height = size.width * 9.0 / 16.0;
debug!(?height);
Container::new(
Container::new(
self.presenter
.view()
.map(|m| Message::Present(m)),
)
.height(height)
.max_height(height)
.height(height),
)
.align_bottom(Length::Fill)
.into()
}),
Container::new(
Container::new(if self.presenter.video.is_some() {
row![
video_button_icon,
Container::new(slider(
@ -477,12 +479,13 @@ impl cosmic::Application for App {
.padding([7, 0, 0, 0])
]
.padding(5)
)
} else {
row![]
})
.center_x(Length::Fill),
Space::with_height(Length::Fill),
]
.spacing(3),
)
.center_y(Length::Shrink);
.spacing(3);
let row = row![
Container::new(
@ -496,7 +499,7 @@ impl cosmic::Application for App {
)
.center_y(Length::Fill)
.align_right(Length::Fill)
.width(Length::FillPortion(1)),
.width(Length::FillPortion(2)),
Container::new(slide_preview)
.center_y(Length::Fill)
.width(Length::FillPortion(3)),
@ -511,7 +514,7 @@ impl cosmic::Application for App {
)
.center_y(Length::Fill)
.align_left(Length::Fill)
.width(Length::FillPortion(1)),
.width(Length::FillPortion(2)),
]
.width(Length::Fill)
.height(Length::Fill)