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 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 16:12:44 +00:00
parent 52bd180b56
commit f68c1e297c

View File

@@ -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;