From c2da6e53e3121f7665d39c27db6b24bb052eb7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20H=C3=A4ih=C3=A4l=C3=A4?= Date: Fri, 19 Jul 2024 10:42:41 +0300 Subject: [PATCH] Fix layout shifts in shop UI A bit of a hack, should do a new UI for the explanation box that doesn't fill up quite as easily. --- client/lib/src/ui/shop/setup_shop.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/lib/src/ui/shop/setup_shop.rs b/client/lib/src/ui/shop/setup_shop.rs index 5eedc330..e002fb09 100644 --- a/client/lib/src/ui/shop/setup_shop.rs +++ b/client/lib/src/ui/shop/setup_shop.rs @@ -223,6 +223,8 @@ fn setup_shop_root( flex_direction: FlexDirection::Column, justify_content: JustifyContent::FlexStart, row_gap: Val::Percent(0.5), + + flex_basis: Val::Percent(100.0), ..default() }, ..default() @@ -303,6 +305,7 @@ fn setup_info_panel( background_color: SHOP_DARK_BACKGROUND_COLOR.into(), style: Style { padding: UiRect::all(Val::Px(3.0)), + height: Val::Percent(25.0), ..default() }, ..default() @@ -322,6 +325,7 @@ fn big_icon(commands: &mut Commands, parent: Entity) -> Entity { ImageBundle { style: Style { width: Val::Px(200.0), + max_width: Val::Px(200.0), flex_shrink: 0.0, ..default() },