diff --git a/Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs b/Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs index 0fb1b7d507..12f8422aeb 100644 --- a/Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs +++ b/Content.Client/UserInterface/Screens/DefaultGameScreen.xaml.cs @@ -25,7 +25,15 @@ public sealed partial class DefaultGameScreen : InGameScreen Chat.OnResized += ChatOnResized; Chat.OnChatResizeFinish += ChatOnResizeFinish; - Actions.ActionsContainer.Columns = 1; + + MainViewport.OnResized += ResizeActionContainer; + Inventory.OnResized += ResizeActionContainer; + } + + private void ResizeActionContainer() + { + float indent = Inventory.Size.Y + TopBar.Size.Y + 40; + Actions.ActionsContainer.MaxGridHeight = MainViewport.Size.Y - indent; } private void ChatOnResizeFinish(Vector2 _) diff --git a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs index 45a29e03f1..e04d377d32 100644 --- a/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs +++ b/Content.Client/UserInterface/Screens/SeparatedChatGameScreen.xaml.cs @@ -26,6 +26,14 @@ public sealed partial class SeparatedChatGameScreen : InGameScreen ScreenContainer.OnSplitResizeFinished += () => OnChatResized?.Invoke(new Vector2(ScreenContainer.SplitFraction, 0)); + + ViewportContainer.OnResized += ResizeActionContainer; + } + + private void ResizeActionContainer() + { + float indent = 20; + Actions.ActionsContainer.MaxGridWidth = ViewportContainer.Size.X - indent; } public override ChatBox ChatBox => GetWidget()!;