From f68c1e297c4bf8d69facf54b59631fab6efa768f Mon Sep 17 00:00:00 2001 From: ericek111 Date: Wed, 19 Aug 2026 16:12:44 +0000 Subject: [PATCH] Give the channel dialog's spare height to the description The tabs were the growing half, which left them padding empty space below their content while the description stayed five rows tall. They now take their natural height at the bottom of the dialog and every spare pixel goes to the description instead. Co-Authored-By: Claude Opus 5 --- .../main/java/com/ts3client/ui/ChannelDialog.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ts3-client/swing/src/main/java/com/ts3client/ui/ChannelDialog.java b/ts3-client/swing/src/main/java/com/ts3client/ui/ChannelDialog.java index bc8d063..2f26f11 100644 --- a/ts3-client/swing/src/main/java/com/ts3client/ui/ChannelDialog.java +++ b/ts3-client/swing/src/main/java/com/ts3client/ui/ChannelDialog.java @@ -142,10 +142,15 @@ final class ChannelDialog extends JDialog { tabs.addTab("Permissions", permissionsPanel); tabs.addTab("Advanced", advancedPanel); + // The tabs need no more than their natural height, so they sit at the bottom + // with the buttons and every spare pixel goes to the description instead. + JPanel bottom = new JPanel(new BorderLayout(0, 6)); + bottom.add(tabs, BorderLayout.CENTER); + bottom.add(buttons(), BorderLayout.SOUTH); + getContentPane().setLayout(new BorderLayout(0, 6)); - getContentPane().add(header(), BorderLayout.NORTH); - getContentPane().add(tabs, BorderLayout.CENTER); - getContentPane().add(buttons(), BorderLayout.SOUTH); + getContentPane().add(header(), BorderLayout.CENTER); + getContentPane().add(bottom, BorderLayout.SOUTH); setEnabledForLoading(false); Dialogs.closeOnEscape(this); @@ -235,6 +240,7 @@ final class ChannelDialog extends JDialog { c.gridy = 4; c.gridwidth = 3; c.weightx = 1; + c.weighty = 1; c.fill = GridBagConstraints.BOTH; panel.add(new JScrollPane(description), c); return panel;