Merge remote-tracking branch 'origin/master' into HEAD
This commit is contained in:
@@ -122,6 +122,7 @@ public class ClientUI
|
||||
private final Provider<ClientThread> clientThreadProvider;
|
||||
private final EventBus eventBus;
|
||||
private final boolean safeMode;
|
||||
private final String title;
|
||||
|
||||
private final CardLayout cardLayout = new CardLayout();
|
||||
private final Rectangle sidebarButtonPosition = new Rectangle();
|
||||
@@ -166,6 +167,7 @@ public class ClientUI
|
||||
this.clientThreadProvider = clientThreadProvider;
|
||||
this.eventBus = eventBus;
|
||||
this.safeMode = safeMode;
|
||||
this.title = RuneLiteProperties.getTitle();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@@ -299,7 +301,7 @@ public class ClientUI
|
||||
return false;
|
||||
}
|
||||
|
||||
frame.setTitle(RuneLiteProperties.getTitle() + " - " + name);
|
||||
frame.setTitle(title + " - " + name);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -326,7 +328,7 @@ public class ClientUI
|
||||
// Try to enable fullscreen on OSX
|
||||
OSXUtil.tryEnableFullscreen(frame);
|
||||
|
||||
frame.setTitle(RuneLiteProperties.getTitle());
|
||||
frame.setTitle(title);
|
||||
frame.setIconImage(ICON);
|
||||
frame.getLayeredPane().setCursor(Cursor.getDefaultCursor()); // Prevent substance from using a resize cursor for pointing
|
||||
frame.setLocationRelativeTo(frame.getOwner());
|
||||
@@ -512,7 +514,7 @@ public class ClientUI
|
||||
frame.revalidateMinimumSize();
|
||||
|
||||
// Create tray icon (needs to be created after frame is packed)
|
||||
trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame);
|
||||
trayIcon = SwingUtil.createTrayIcon(ICON, title, frame);
|
||||
|
||||
// Move frame around (needs to be done after frame is packed)
|
||||
if (config.rememberScreenBounds() && !safeMode)
|
||||
@@ -745,6 +747,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Returns current cursor set on game container
|
||||
*
|
||||
* @return awt cursor
|
||||
*/
|
||||
public Cursor getCurrentCursor()
|
||||
@@ -754,6 +757,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Returns current custom cursor or default system cursor if cursor is not set
|
||||
*
|
||||
* @return awt cursor
|
||||
*/
|
||||
public Cursor getDefaultCursor()
|
||||
@@ -764,6 +768,7 @@ public class ClientUI
|
||||
/**
|
||||
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
||||
* FIXME: This is working properly only on Windows, Linux and Mac are displaying cursor incorrectly
|
||||
*
|
||||
* @param image cursor image
|
||||
* @param name cursor name
|
||||
*/
|
||||
@@ -782,6 +787,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Changes cursor for client window. Requires ${@link ClientUI#init()} to be called first.
|
||||
*
|
||||
* @param cursor awt cursor
|
||||
*/
|
||||
public void setCursor(final Cursor cursor)
|
||||
@@ -791,6 +797,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Resets client window cursor to default one.
|
||||
*
|
||||
* @see ClientUI#setCursor(BufferedImage, String)
|
||||
*/
|
||||
public void resetCursor()
|
||||
@@ -826,6 +833,7 @@ public class ClientUI
|
||||
|
||||
/**
|
||||
* Paint UI related overlays to target graphics
|
||||
*
|
||||
* @param graphics target graphics
|
||||
*/
|
||||
public void paintOverlays(final Graphics2D graphics)
|
||||
@@ -1035,16 +1043,16 @@ public class ClientUI
|
||||
|
||||
if (config.usernameInTitle() && (client instanceof Client))
|
||||
{
|
||||
final Player player = ((Client)client).getLocalPlayer();
|
||||
final Player player = ((Client) client).getLocalPlayer();
|
||||
|
||||
if (player != null && player.getName() != null)
|
||||
{
|
||||
frame.setTitle(RuneLiteProperties.getTitle() + " - " + player.getName());
|
||||
frame.setTitle(title + " - " + player.getName());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
frame.setTitle(RuneLiteProperties.getTitle());
|
||||
frame.setTitle(title);
|
||||
}
|
||||
|
||||
if (frame.isAlwaysOnTopSupported())
|
||||
|
||||
@@ -243,6 +243,17 @@ public class ContainableFrame extends JFrame
|
||||
expandedClientOppositeDirection = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtendedState(int state)
|
||||
{
|
||||
if (OSType.getOSType() != OSType.MacOS)
|
||||
{
|
||||
super.setMaximizedBounds(getWindowAreaBounds());
|
||||
}
|
||||
|
||||
super.setExtendedState(state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Due to Java bug JDK-4737788, maximizing an undecorated frame causes it to cover the taskbar.
|
||||
* As a workaround, Substance calls this method when the window is maximized to manually set the
|
||||
|
||||
Reference in New Issue
Block a user