feat: Use fluid grid
Some checks failed
build / checks-matrix (push) Has been cancelled
build / checks-build (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-11-19 02:29:04 +05:30
parent 442a7e49b2
commit 29674df85e

View File

@@ -202,6 +202,7 @@ fn body(state: &State) -> Element<'_, Message> {
scrollable( scrollable(
container( container(
Grid::with_children(state.cache.items_of(state.current).into_iter().map(card)) Grid::with_children(state.cache.items_of(state.current).into_iter().map(card))
.fluid(400)
.spacing(50), .spacing(50),
) )
.padding(50) .padding(50)
@@ -219,7 +220,6 @@ fn header(state: &State) -> Element<'_, Message> {
container( container(
Button::new( Button::new(
Text::new(state.jellyfin_client.config.server_url.as_str()) Text::new(state.jellyfin_client.config.server_url.as_str())
.width(Length::Fill)
.align_x(Alignment::Start), .align_x(Alignment::Start),
) )
.on_press(Message::Home), .on_press(Message::Home),
@@ -299,8 +299,8 @@ fn card(item: &Item) -> Element<'_, Message> {
.width(Length::Fill) .width(Length::Fill)
.height(Length::Fill), .height(Length::Fill),
) )
.width(Length::FillPortion(3)) // .width(Length::FillPortion(5))
.height(Length::FillPortion(3)) // .height(Length::FillPortion(3))
.style(container::rounded_box), .style(container::rounded_box),
) )
.on_press(Message::OpenItem(Some(item.id))) .on_press(Message::OpenItem(Some(item.id)))