Fix remember screen bounds for KEEP_GAME_SIZE

This commit is contained in:
WooxSolo
2018-05-30 20:48:24 +02:00
parent 13ecc3efc9
commit 966ee101d3

View File

@@ -755,16 +755,19 @@ public class ClientUI
{ {
final Rectangle bounds = frame.getBounds(); final Rectangle bounds = frame.getBounds();
// Try to contract sidebar if (config.automaticResizeType() == ExpandResizeType.KEEP_GAME_SIZE)
if (sidebarOpen)
{ {
bounds.width -= pluginToolbar.getWidth(); // Try to contract sidebar
} if (sidebarOpen)
{
bounds.width -= pluginToolbar.getWidth();
}
// Try to contract plugin panel // Try to contract plugin panel
if (pluginPanel != null) if (pluginPanel != null)
{ {
bounds.width -= pluginPanel.getWrappedPanel().getPreferredSize().width; bounds.width -= pluginPanel.getWrappedPanel().getPreferredSize().width;
}
} }
configManager.unsetConfiguration(CONFIG_GROUP, CONFIG_CLIENT_MAXIMIZED); configManager.unsetConfiguration(CONFIG_GROUP, CONFIG_CLIENT_MAXIMIZED);