From 48799817c174129cee17ce44af4925f9ceb8a08f Mon Sep 17 00:00:00 2001 From: RuneLite updater Date: Thu, 25 Jan 2024 14:59:49 +0000 Subject: [PATCH 1/7] Bump for 1.10.20.4-SNAPSHOT [ci skip] --- cache/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-maven-plugin/pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cache/pom.xml b/cache/pom.xml index 25282056f..6bc047e81 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT cache diff --git a/pom.xml b/pom.xml index 6b65c8daf..6523d9b41 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT pom RuneLite @@ -63,7 +63,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.10.20.3 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 1ad77ea76..627138626 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index ef0e6f54c..20c77dbfb 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index e8aed4475..0423526b2 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT jshell diff --git a/runelite-maven-plugin/pom.xml b/runelite-maven-plugin/pom.xml index b0af0be0a..e3a2d75d7 100644 --- a/runelite-maven-plugin/pom.xml +++ b/runelite-maven-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.3 + 1.10.20.4-SNAPSHOT runelite-maven-plugin From 4e2181becf707442ca1c69798aea72fa1374e0e6 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Jan 2024 14:10:37 -0500 Subject: [PATCH 2/7] ContainableFrame: apply insets to old rhs offset behavior --- .../main/java/net/runelite/client/ui/ContainableFrame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java index cd5d1aae5..082a451e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java @@ -124,8 +124,8 @@ private void applyChange(int x, int y, int width, int height, int oldX, int oldY if (width > oldWidth && rect.getMaxX() > dpyBounds.getMaxX() - && oldX + oldWidth + SCREEN_EDGE_CLOSE_DISTANCE > dpyBounds.getMaxX() - && oldX + oldWidth <= dpyBounds.getMaxX()) + && (oldX + insets.left) + (oldWidth - (insets.left + insets.right)) + SCREEN_EDGE_CLOSE_DISTANCE > dpyBounds.getMaxX() + && (oldX + insets.left) + (oldWidth - (insets.left + insets.right)) <= dpyBounds.getMaxX()) { // attempt to retain the distance between us and the edge when shifting left rect.x -= width - oldWidth; From 0b67e33765f1b7b89eac7f7c924bf0009008205a Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Jan 2024 15:11:51 -0500 Subject: [PATCH 3/7] laf: change titlepane height to 23px Substance titlebar is 23px with a 4px border. Set titlebar height to 23px and then add a 4px border. This fixes the titlebar to be 23px when maximized vertically instead of 27px. --- .../main/java/net/runelite/client/ui/ClientToolbarPanel.java | 2 +- .../src/main/java/net/runelite/client/ui/ClientUI.java | 2 +- .../resources/net/runelite/client/ui/laf/RuneLiteLAF.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientToolbarPanel.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientToolbarPanel.java index 2fff5db52..44dc6c09b 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientToolbarPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientToolbarPanel.java @@ -67,7 +67,7 @@ JButton add(NavigationButton nb, boolean resize) SwingUtil.removeButtonDecorations(jb); jb.setToolTipText(nb.getTooltip()); jb.setFocusable(false); - jb.setPreferredSize(new Dimension(24, 24)); + jb.setPreferredSize(new Dimension(23, 23)); jb.setAlignmentX(.5f); jb.setAlignmentY(.5f); 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 cbb45d8c2..415f332b5 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 @@ -570,7 +570,7 @@ private void applyCustomChromeBorder() { content.setBorder((frame.getExtendedState() & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH ? null - : new MatteBorder(0, 4, 4, 4, ColorScheme.DARKER_GRAY_COLOR)); + : new MatteBorder(4, 4, 4, 4, ColorScheme.DARKER_GRAY_COLOR)); } public void show() diff --git a/runelite-client/src/main/resources/net/runelite/client/ui/laf/RuneLiteLAF.properties b/runelite-client/src/main/resources/net/runelite/client/ui/laf/RuneLiteLAF.properties index 8528a5fcb..1b1f9afc9 100644 --- a/runelite-client/src/main/resources/net/runelite/client/ui/laf/RuneLiteLAF.properties +++ b/runelite-client/src/main/resources/net/runelite/client/ui/laf/RuneLiteLAF.properties @@ -113,7 +113,7 @@ TitlePane.background=@DARKER_GRAY TitlePane.unifiedBackground=false TitlePane.useWindowDecorations=false TitlePane.font=bold -TitlePane.buttonSize = 33,27 +TitlePane.buttonSize=33,23 ToolBar.background=@DARKER_GRAY From 144e2269817ebf1699093289cf3e10c0aba3c316 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 25 Jan 2024 18:56:14 -0500 Subject: [PATCH 4/7] clientui: adjust for frame insets when performing display bounds check This prevents the client resetting its position when it is too close to the display edge due to the insets --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 415f332b5..719f70720 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 @@ -599,6 +599,15 @@ public void show() frame.setBounds(clientBounds); appliedSize = true; + // Adjust for insets before performing display test + Insets insets = frame.getInsets(); + clientBounds = new Rectangle( + clientBounds.x + insets.left, + clientBounds.y + insets.top, + clientBounds.width - (insets.left + insets.right), + clientBounds.height - (insets.top + insets.bottom) + ); + // Check that the bounds are contained inside a valid display GraphicsConfiguration gc = findDisplayFromBounds(clientBounds); if (gc == null) From 69e108487756b33cc547ac170b209ef6b36e0853 Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 25 Jan 2024 17:17:23 -0700 Subject: [PATCH 5/7] ContainableFrame: set suction when shifted by native containment --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 6 +++--- .../java/net/runelite/client/ui/ContainableFrame.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 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 719f70720..f28a29fec 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 @@ -1378,12 +1378,12 @@ private void layout(Container content, boolean forceSizingClient) client.setBounds(insets.left, insets.top, clientWidth, innerHeight); sidebar.setBounds(insets.left + clientWidth, insets.top, sidebarWidth, innerHeight); - Dimension oldSize = frame.getSize(); + Rectangle oldBounds = frame.getBounds(); frame.revalidateMinimumSize(); if ((OSType.getOSType() != OSType.Windows || (changed & Frame.MAXIMIZED_BOTH) == 0) - && !frame.getPreferredSize().equals(oldSize)) + && !frame.getPreferredSize().equals(oldBounds.getSize())) { - frame.containedSetSize(frame.getPreferredSize(), oldSize); + frame.containedSetSize(frame.getPreferredSize(), oldBounds); } log.trace("finishing layout - content={} client={} sidebar={} frame={}", content.getWidth(), client.getWidth(), sidebar.getWidth(), frame.getWidth()); diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java index 082a451e4..b65ec2737 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java @@ -113,7 +113,7 @@ private void applyChange(int x, int y, int width, int height, int oldX, int oldY if (rightSideSuction) { // only keep suction while where are near the screen edge - rightSideSuction = getBounds().getMaxX() + SCREEN_EDGE_CLOSE_DISTANCE >= dpyBounds.getMaxX(); + rightSideSuction = oldX + oldWidth - insets.right + SCREEN_EDGE_CLOSE_DISTANCE >= dpyBounds.getMaxX(); } if (rightSideSuction && width < oldWidth) @@ -145,7 +145,7 @@ private void applyChange(int x, int y, int width, int height, int oldX, int oldY rect.y = Math.max(rect.y, dpyBounds.y); } - if (width > oldWidth && rect.x < x) + if (width > oldWidth && rect.x < oldX + insets.left) { // we have shifted the window left to avoid the right side going oob rightSideSuction = true; @@ -182,10 +182,10 @@ else if (whDifferent) /** * Adjust the frame's size, containing to the screen if {@code Mode.RESIZING} is set */ - public void containedSetSize(Dimension size, Dimension oldSize) + public void containedSetSize(Dimension size, Rectangle oldBounds) { // accept oldSize from the outside since the min size might have been set, which forces the size to change - applyChange(getX(), getY(), size.width, size.height, getX(), getY(), oldSize.width, this.containedInScreen != Mode.NEVER); + applyChange(getX(), getY(), size.width, size.height, oldBounds.x, oldBounds.y, oldBounds.width, this.containedInScreen != Mode.NEVER); } /** From 4ca62a9f8ada114ddf07f81df11f0428fd76bd5e Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 25 Jan 2024 17:25:16 -0700 Subject: [PATCH 6/7] ContainableFrame: use hungarian to prevent window / content coord misuse --- .../runelite/client/ui/ContainableFrame.java | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java index b65ec2737..42a0f3a15 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java @@ -98,7 +98,7 @@ public void pack() // we must use the deprecated variants since that it what Component ultimately delegates to @SuppressWarnings("deprecation") - private void applyChange(int x, int y, int width, int height, int oldX, int oldY, int oldWidth, boolean contain) + private void applyChange(int wX, int wY, int wWidth, int wHeight, int wOldx, int wOldY, int wOldWidth, boolean contain) { try { @@ -106,71 +106,71 @@ private void applyChange(int x, int y, int width, int height, int oldX, int oldY if (contain && !isFullScreen()) { - Rectangle dpyBounds = this.getGraphicsConfiguration().getBounds(); + Rectangle cDpyBounds = this.getGraphicsConfiguration().getBounds(); Insets insets = this.getInsets(); - Rectangle rect = new Rectangle(x + insets.left, y + insets.top, width - (insets.left + insets.right), height - (insets.top + insets.bottom)); + Rectangle cRect = new Rectangle(wX + insets.left, wY + insets.top, wWidth - (insets.left + insets.right), wHeight - (insets.top + insets.bottom)); if (rightSideSuction) { // only keep suction while where are near the screen edge - rightSideSuction = oldX + oldWidth - insets.right + SCREEN_EDGE_CLOSE_DISTANCE >= dpyBounds.getMaxX(); + rightSideSuction = wOldx + wOldWidth - insets.right + SCREEN_EDGE_CLOSE_DISTANCE >= cDpyBounds.getMaxX(); } - if (rightSideSuction && width < oldWidth) + if (rightSideSuction && wWidth < wOldWidth) { // shift the window so the right side is near the edge again - rect.x += oldWidth - width; + cRect.x += wOldWidth - wWidth; } - if (width > oldWidth - && rect.getMaxX() > dpyBounds.getMaxX() - && (oldX + insets.left) + (oldWidth - (insets.left + insets.right)) + SCREEN_EDGE_CLOSE_DISTANCE > dpyBounds.getMaxX() - && (oldX + insets.left) + (oldWidth - (insets.left + insets.right)) <= dpyBounds.getMaxX()) + if (wWidth > wOldWidth + && cRect.getMaxX() > cDpyBounds.getMaxX() + && (wOldx + insets.left) + (wOldWidth - (insets.left + insets.right)) + SCREEN_EDGE_CLOSE_DISTANCE > cDpyBounds.getMaxX() + && (wOldx + insets.left) + (wOldWidth - (insets.left + insets.right)) <= cDpyBounds.getMaxX()) { // attempt to retain the distance between us and the edge when shifting left - rect.x -= width - oldWidth; + cRect.x -= wWidth - wOldWidth; } - rect.x -= Math.max(0, rect.getMaxX() - dpyBounds.getMaxX()); - rect.y -= Math.max(0, rect.getMaxY() - dpyBounds.getMaxY()); + cRect.x -= Math.max(0, cRect.getMaxX() - cDpyBounds.getMaxX()); + cRect.y -= Math.max(0, cRect.getMaxY() - cDpyBounds.getMaxY()); // if we are just resizing don't try to move the left side out - if (rect.x != oldX + insets.left) + if (cRect.x != wOldx + insets.left) { - rect.x = Math.max(rect.x, dpyBounds.x); + cRect.x = Math.max(cRect.x, cDpyBounds.x); } - if (rect.y != oldY + insets.top) + if (cRect.y != wOldY + insets.top) { - rect.y = Math.max(rect.y, dpyBounds.y); + cRect.y = Math.max(cRect.y, cDpyBounds.y); } - if (width > oldWidth && rect.x < oldX + insets.left) + if (wWidth > wOldWidth && cRect.x < wOldx + insets.left) { // we have shifted the window left to avoid the right side going oob rightSideSuction = true; } - x = rect.x - insets.left; - y = rect.y - insets.top; - width = rect.width + insets.left + insets.right; - height = rect.height + insets.top + insets.bottom; + wX = cRect.x - insets.left; + wY = cRect.y - insets.top; + wWidth = cRect.width + insets.left + insets.right; + wHeight = cRect.height + insets.top + insets.bottom; } - boolean xyDifferent = getX() != x || getY() != y; - boolean whDifferent = getWidth() != width || getHeight() != height; + boolean xyDifferent = getX() != wX || getY() != wY; + boolean whDifferent = getWidth() != wWidth || getHeight() != wHeight; if (xyDifferent && whDifferent) { - super.reshape(x, y, width, height); + super.reshape(wX, wY, wWidth, wHeight); } else if (xyDifferent) { - super.move(x, y); + super.move(wX, wY); } else if (whDifferent) { - super.resize(width, height); + super.resize(wWidth, wHeight); } } finally From 1f2cc51f35d571b0a60606535199b55e8ece8242 Mon Sep 17 00:00:00 2001 From: RuneLite updater Date: Fri, 26 Jan 2024 16:11:03 +0000 Subject: [PATCH 7/7] Release 1.10.20.4 --- cache/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-maven-plugin/pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cache/pom.xml b/cache/pom.xml index 6bc047e81..9abf2f03b 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 cache diff --git a/pom.xml b/pom.xml index 6523d9b41..d382dca5f 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 pom RuneLite @@ -63,7 +63,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.10.20.4 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 627138626..0c130f3db 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 20c77dbfb..7f3980034 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 0423526b2..b383cc1f2 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 jshell diff --git a/runelite-maven-plugin/pom.xml b/runelite-maven-plugin/pom.xml index e3a2d75d7..c9f9f4e0d 100644 --- a/runelite-maven-plugin/pom.xml +++ b/runelite-maven-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.20.4-SNAPSHOT + 1.10.20.4 runelite-maven-plugin