Skip to content

Commit

Permalink
UI adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Mar 4, 2024
1 parent 1727ee8 commit 3b5e35c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.concurrent.CountDownLatch;

public class SetupDialog extends JDialog {
private static final int HEIGHT = 500;
private static final int HEIGHT = 600;
private static final int WIDTH = (int) (HEIGHT * /* golden ratio */ 1.618);

private final ModpackConfiguration configuration;
Expand Down Expand Up @@ -39,20 +39,14 @@ public ModSelectionPage navigateToSelectionPage(InstallSelector installSelector)
}

private <T extends JPanel> T updateContent(T newContent, boolean hasNextButton) {
newContent.setPreferredSize(new Dimension(WIDTH - 30, 0));
newContent.setMaximumSize(new Dimension(WIDTH - 30, Integer.MAX_VALUE));

JPanel wrapperPanel = new JPanel();
wrapperPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
wrapperPanel.setLayout(new BoxLayout(wrapperPanel, BoxLayout.PAGE_AXIS));

JScrollPane scrollPane = new JScrollPane(newContent);
scrollPane.setSize(WIDTH, HEIGHT - 30);
scrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, HEIGHT - 55));
wrapperPanel.add(scrollPane);

JPanel consentPanel = new JPanel();
consentPanel.setMaximumSize(new Dimension(WIDTH, 30));
consentPanel.setLayout(new BorderLayout());

wrapperPanel.add(Box.createVerticalStrut(5));
Expand All @@ -68,8 +62,6 @@ private <T extends JPanel> T updateContent(T newContent, boolean hasNextButton)
nextLatch = null;
}

wrapperPanel.setSize(WIDTH, HEIGHT);

setContentPane(wrapperPanel);
revalidate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ private void setupGroupOption(String groupName, List<SelectableInstallOption> op
JPanel optionPanel = new JPanel();
optionPanel.setLayout(new BoxLayout(optionPanel, BoxLayout.Y_AXIS));

JRadioButton installRadioButton = new JRadioButton(option.getName());
installRadioButton.setSelected(option.isSelected());
JRadioButton installRadioButton = new JRadioButton(option.getName(), option.isSelected());
installRadioButton.addItemListener(e -> option.setSelected(installRadioButton.isSelected()));
group.add(installRadioButton);
optionPanel.add(installRadioButton);
Expand Down

0 comments on commit 3b5e35c

Please sign in to comment.