Commit 3c144146 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: GenericJTabbedDialog - don't stretch checkboxes (fix accidental toggle)

Checkboxes were laid out with fill=HORIZONTAL, stretching the (text-less) JCheckBox across the half-width cell so its click target reached the scrollbar - a near-scrollbar miss-click silently toggled them (this flipped 'DNN remote' off mid-session). Anchor checkboxes WEST at natural size; the rest of the cell is now dead space. Applies to all tabbed dialogs.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 5bee1911
......@@ -315,7 +315,13 @@ public class GenericJTabbedDialog implements ActionListener {
label.setHorizontalAlignment(JLabel.RIGHT);
tab.add(label,gbc);
gbc.gridx = 1;
tab.add(component,gbc);
if (component instanceof JCheckBox) { // don't stretch checkboxes - keep the click target at the box, not the whole half-width cell (a near-scrollbar click was toggling them) // By Claude on 06/20/2026
gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST;
tab.add(component,gbc);
gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.CENTER; // restore for the following rows
} else {
tab.add(component,gbc);
}
}
}
// Add empty label that would push up all other rows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment