From b3d9de7a4152db2d15234d263508a908093177bb Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Thu, 2 Aug 2018 07:57:44 +0200 Subject: [PATCH] Reverse ClientUI sidebar condition - Reverse ClientUI sidebar condition as when opening sidebar is always open so current master will effectively shrink window instead of restoring to correct size - Apply this condition also to KEEP_WINDOW_SIZE Signed-off-by: Tomas Slusny --- .../main/java/net/runelite/client/ui/ClientUI.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index 2e3ecf75aa..0539517a65 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -735,13 +735,14 @@ public class ClientUI { final Rectangle bounds = frame.getBounds(); + // Try to expand sidebar + if (!sidebarOpen) + { + bounds.width += pluginToolbar.getWidth(); + } + if (config.automaticResizeType() == ExpandResizeType.KEEP_GAME_SIZE) { - // Try to contract sidebar - if (sidebarOpen) - { - bounds.width -= pluginToolbar.getWidth(); - } // Try to contract plugin panel if (pluginPanel != null)