From 2827bd02b2428478419988aa80f1b135e70727d7 Mon Sep 17 00:00:00 2001 From: infuse21 Date: Thu, 2 Jul 2026 12:33:55 +0100 Subject: [PATCH 1/2] fix: prevent Microbot plugin names clipping in sidebar Fixes long Microbot plugin names clipping or overlapping in the installed plugin sidebar. Plugin names can include HTML color prefixes. The sidebar row was always fixed at 20px, so names that wrapped to a second line were clipped. This keeps the colored HTML rendering while sizing the row from the rendered label height. --- .../microbot/ui/MicrobotPluginListItem.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListItem.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListItem.java index ee4c756e6e..85a4b43d16 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListItem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/ui/MicrobotPluginListItem.java @@ -46,6 +46,7 @@ class MicrobotPluginListItem extends JPanel implements SearchablePlugin { private static final ImageIcon ON_STAR; private static final ImageIcon OFF_STAR; + private static final int MIN_ITEM_HEIGHT = 20; private final MicrobotPluginListPanel pluginListPanel; @@ -90,9 +91,10 @@ class MicrobotPluginListItem extends JPanel implements SearchablePlugin } setLayout(new BorderLayout(3, 0)); - setPreferredSize(new Dimension(MicrobotPluginListPanel.LIST_ITEM_WIDTH, 20)); JLabel nameLabel = createNameLabel(pluginConfig); + int itemHeight = Math.max(MIN_ITEM_HEIGHT, nameLabel.getPreferredSize().height); + setPreferredSize(new Dimension(MicrobotPluginListPanel.LIST_ITEM_WIDTH, itemHeight)); pinButton = new JToggleButton(OFF_STAR); pinButton.setSelectedIcon(ON_STAR); @@ -185,19 +187,27 @@ class MicrobotPluginListItem extends JPanel implements SearchablePlugin @NotNull private static JLabel createNameLabel(MicrobotPluginConfigurationDescriptor pluginConfig) { - JLabel nameLabel = new JLabel(pluginConfig.getName()); int buttons = 21 /*pin*/ + 25 /*config, if present*/ + 34 /*toggle approx*/ + 12 /*margins*/; int textWidth = MicrobotPluginListPanel.LIST_ITEM_WIDTH - buttons; - nameLabel.setText("
" + pluginConfig.getName() + "
"); + JLabel nameLabel = new JLabel("
" + htmlBody(pluginConfig.getName()) + "
"); nameLabel.setForeground(Color.WHITE); + nameLabel.setHorizontalAlignment(JLabel.LEFT); + nameLabel.setVerticalAlignment(JLabel.CENTER); if (!pluginConfig.getDescription().isEmpty()) { - nameLabel.setToolTipText("" + pluginConfig.getName() + ":
" + pluginConfig.getDescription() + ""); + nameLabel.setToolTipText("" + htmlBody(pluginConfig.getName()) + ":
" + htmlBody(pluginConfig.getDescription()) + ""); } return nameLabel; } + private static String htmlBody(String html) + { + return html + .replaceFirst("(?i)^\\s*", "") + .replaceFirst("(?i)\\s*$", ""); + } + @Override public String getSearchableName() { From ee3efdf5981334f5c76c749d6e327d4c3bc53868 Mon Sep 17 00:00:00 2001 From: Sami Date: Sat, 4 Jul 2026 06:39:47 +0200 Subject: [PATCH 2/2] chore: bump microbot version to 2.6.12 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ff3ece997c..c23f4c0aa3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,7 +32,7 @@ project.build.version=1.12.31.1 runelite.injected-client.version=1.12.31.1 glslang.path= -microbot.version=2.6.11 +microbot.version=2.6.12 microbot.commit.sha=nogit microbot.repo.url=http://138.201.81.246:8081/repository/microbot-snapshot/ microbot.repo.username=