runelite-client: Don't check if customChrome is enabled after startup
This value is locked in at startup, the config value is irrelevant to what should actually be happening
This commit is contained in:
@@ -127,6 +127,7 @@ public class ClientUI
|
||||
private final Provider<ClientThread> clientThreadProvider;
|
||||
private final CardLayout cardLayout = new CardLayout();
|
||||
private final Rectangle sidebarButtonPosition = new Rectangle();
|
||||
private boolean withTitleBar;
|
||||
private ContainableFrame frame;
|
||||
private JPanel navContainer;
|
||||
private PluginPanel pluginPanel;
|
||||
@@ -179,8 +180,7 @@ public class ClientUI
|
||||
{
|
||||
final NavigationButton navigationButton = event.getButton();
|
||||
final PluginPanel pluginPanel = navigationButton.getPanel();
|
||||
final boolean inTitle = !event.getButton().isTab() &&
|
||||
(config.enableCustomChrome() || SwingUtil.isCustomTitlePanePresent(frame));
|
||||
final boolean inTitle = !event.getButton().isTab() && withTitleBar;
|
||||
final int iconSize = 16;
|
||||
|
||||
if (pluginPanel != null)
|
||||
@@ -382,7 +382,7 @@ public class ClientUI
|
||||
mouseManager.registerMouseListener(mouseListener);
|
||||
|
||||
// Decorate window with custom chrome and titlebar if needed
|
||||
final boolean withTitleBar = config.enableCustomChrome();
|
||||
withTitleBar = config.enableCustomChrome();
|
||||
frame.setUndecorated(withTitleBar);
|
||||
|
||||
if (withTitleBar)
|
||||
@@ -618,7 +618,7 @@ public class ClientUI
|
||||
*/
|
||||
public void paintOverlays(final Graphics2D graphics)
|
||||
{
|
||||
if (!(client instanceof Client) || config.enableCustomChrome())
|
||||
if (!(client instanceof Client) || withTitleBar)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -807,7 +807,7 @@ public class ClientUI
|
||||
}
|
||||
|
||||
frame.setExpandResizeType(config.automaticResizeType());
|
||||
frame.setContainedInScreen(config.containInScreen() && config.enableCustomChrome());
|
||||
frame.setContainedInScreen(config.containInScreen() && withTitleBar);
|
||||
|
||||
if (!config.rememberScreenBounds())
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.awt.Frame;
|
||||
import java.awt.Image;
|
||||
import java.awt.SystemTray;
|
||||
import java.awt.TrayIcon;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
@@ -59,7 +58,6 @@ import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import net.runelite.client.ui.components.CustomScrollBarUI;
|
||||
import org.pushingpixels.substance.internal.SubstanceSynapse;
|
||||
import org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities;
|
||||
|
||||
/**
|
||||
* Various Swing utilities.
|
||||
@@ -279,15 +277,4 @@ public class SwingUtil
|
||||
navigationButton.setOnSelect(button::doClick);
|
||||
return button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if custom substance title pane is present.
|
||||
*
|
||||
* @param frame the parent frame
|
||||
* @return true if title pane is present
|
||||
*/
|
||||
public static boolean isCustomTitlePanePresent(final Window frame)
|
||||
{
|
||||
return SubstanceCoreUtilities.getTitlePaneComponent(frame) != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user