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