From 966ee101d3de10bc8595f4f49d854206f4fd0897 Mon Sep 17 00:00:00 2001 From: WooxSolo Date: Wed, 30 May 2018 20:48:24 +0200 Subject: [PATCH] Fix remember screen bounds for KEEP_GAME_SIZE --- .../java/net/runelite/client/ui/ClientUI.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 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 11d1212583..b0e49d65d3 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 @@ -755,16 +755,19 @@ public class ClientUI { final Rectangle bounds = frame.getBounds(); - // Try to contract sidebar - if (sidebarOpen) + if (config.automaticResizeType() == ExpandResizeType.KEEP_GAME_SIZE) { - bounds.width -= pluginToolbar.getWidth(); - } + // Try to contract sidebar + if (sidebarOpen) + { + bounds.width -= pluginToolbar.getWidth(); + } - // Try to contract plugin panel - if (pluginPanel != null) - { - bounds.width -= pluginPanel.getWrappedPanel().getPreferredSize().width; + // Try to contract plugin panel + if (pluginPanel != null) + { + bounds.width -= pluginPanel.getWrappedPanel().getPreferredSize().width; + } } configManager.unsetConfiguration(CONFIG_GROUP, CONFIG_CLIENT_MAXIMIZED);