From c44f0a28921674213c449b5eed8f002d3f5da140 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 26 Nov 2021 03:22:54 +1100 Subject: [PATCH] hiscore panel: change top border size to 10 7426babd3f779cb342e028869831e9cca8cd55e8 fixed the layout ignoring the top margin by setting the preferred size of the search bar Co-authored-by: Adam --- .../net/runelite/client/plugins/hiscore/HiscorePanel.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java index 25ae9a55b3..56673629e4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java @@ -43,6 +43,7 @@ import java.util.List; import java.util.Map; import javax.annotation.Nullable; import javax.inject.Inject; +import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; @@ -145,10 +146,7 @@ public class HiscorePanel extends PluginPanel this.nameAutocompleter = nameAutocompleter; this.hiscoreClient = new HiscoreClient(okHttpClient); - // The layout seems to be ignoring the top margin and only gives it - // a 2-3 pixel margin, so I set the value to 18 to compensate - // TODO: Figure out why this layout is ignoring most of the top margin - setBorder(new EmptyBorder(18, 10, 0, 10)); + setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); setBackground(ColorScheme.DARK_GRAY_COLOR); setLayout(new GridBagLayout());