From 15dd8d9071597c872e3d9296d2fcd3fe597a2e9f Mon Sep 17 00:00:00 2001 From: MrTheMake Date: Fri, 8 Sep 2017 18:21:42 +0200 Subject: [PATCH] Mind the minimum size of the channel selection overlay --- osu.Game/Overlays/ChatOverlay.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index b1deae8272..af5c6d9916 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -212,7 +212,13 @@ namespace osu.Game.Overlays { Trace.Assert(state.Mouse.PositionMouseDown != null); - chatHeight.Value = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y; + double targetChatHeight = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y; + + // If the channel selection screen is shown, mind its minimum height + if (channelSelection.State == Visibility.Visible && targetChatHeight > 1f - channel_selection_min_height) + targetChatHeight = 1f - channel_selection_min_height; + + chatHeight.Value = targetChatHeight; } return true;