feat: Use fluid grid
This commit is contained in:
@@ -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)))
|
||||||
|
|||||||
Reference in New Issue
Block a user