From ffe98be649343130b5dc404527076284c768c30e Mon Sep 17 00:00:00 2001 From: ericek111 Date: Thu, 20 Aug 2026 07:46:36 +0000 Subject: [PATCH] Trim the info panel's rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A channel's permanent/temporary type is not worth a row, and a client's platform reads better on the version line: Version: 3.6.2 … on Linux. Co-Authored-By: Claude Opus 5 --- .../swing/src/main/java/com/ts3client/ui/InfoPanel.java | 9 ++++++--- .../swing/src/main/java/com/ts3client/ui/Theme.java | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ts3-client/swing/src/main/java/com/ts3client/ui/InfoPanel.java b/ts3-client/swing/src/main/java/com/ts3client/ui/InfoPanel.java index ff08b2b..2c8564d 100644 --- a/ts3-client/swing/src/main/java/com/ts3client/ui/InfoPanel.java +++ b/ts3-client/swing/src/main/java/com/ts3client/ui/InfoPanel.java @@ -116,7 +116,6 @@ public final class InfoPanel extends JScrollPane { private static String channelBody(ChannelNode ch) { StringBuilder sb = new StringBuilder(); sb.append(heading(esc(ch.name))); - row(sb, "Type", ch.permanent ? "Permanent" : "Temporary"); if (ch.maxClients >= 0) row(sb, "Max clients", Integer.toString(ch.maxClients)); if (ch.hasPassword) row(sb, "Password", "protected"); if (!ch.topic.isEmpty()) row(sb, "Topic", esc(ch.topic)); @@ -154,8 +153,12 @@ public final class InfoPanel extends JScrollPane { : "#" + cl.channelGroupId); if (cl.talkPower != 0) row(sb, "Talk power", Integer.toString(cl.talkPower)); - if (!cl.platform.isEmpty()) row(sb, "Platform", esc(cl.platform)); - if (!cl.version.isEmpty()) row(sb, "Version", esc(cl.version)); + if (!cl.version.isEmpty()) { + row(sb, "Version", esc(cl.version) + + (cl.platform.isEmpty() ? "" : " on " + esc(cl.platform))); + } else if (!cl.platform.isEmpty()) { + row(sb, "Platform", esc(cl.platform)); + } if (cl.away) row(sb, "Status", "Away"); if (!cl.inputHardware) row(sb, "Microphone", "disabled"); else if (cl.inputMuted) row(sb, "Microphone", "muted"); diff --git a/ts3-client/swing/src/main/java/com/ts3client/ui/Theme.java b/ts3-client/swing/src/main/java/com/ts3client/ui/Theme.java index f7a84b1..8b7dfcf 100644 --- a/ts3-client/swing/src/main/java/com/ts3client/ui/Theme.java +++ b/ts3-client/swing/src/main/java/com/ts3client/ui/Theme.java @@ -43,6 +43,12 @@ public final class Theme { return uiFont().deriveFont(Font.BOLD); } + /** A notch below the UI font, for secondary labels. */ + public static Font uiSmall() { + Font f = uiFont(); + return f.deriveFont(Math.max(9f, f.getSize2D() - 2f)); + } + // ---- surfaces, from the look-and-feel ---- public static Color windowBg() {