From 28b56726f4d76dcac0114f449562f026855e8f00 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Mon, 23 May 2022 00:52:18 +0200 Subject: [PATCH] [#1285] Improve Motors & Configurations UI scalability --- .../MotorMountConfigurationPanel.java | 2 +- .../flightconfigpanel/FlightConfigurationPanel.java | 2 +- .../flightconfigpanel/MotorConfigurationPanel.java | 10 +++++----- .../flightconfigpanel/RecoveryConfigurationPanel.java | 2 +- .../SeparationConfigurationPanel.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/MotorMountConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/MotorMountConfigurationPanel.java index 527fe69fc..26bf33854 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/MotorMountConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/MotorMountConfigurationPanel.java @@ -35,7 +35,7 @@ public class MotorMountConfigurationPanel extends JPanel { table.addMouseListener(new GUIUtil.BooleanTableClickListener(table)); JScrollPane scroll = new JScrollPane(table); - this.add(scroll, "w 200lp, h 150lp, grow"); + this.add(scroll, "w 200lp, h 150lp, grow, pushy"); } } diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java index 98d3c607e..e6c306b3d 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java @@ -139,7 +139,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe updateButtonState(); - this.add(tabs, "spanx, grow, wrap rel"); + this.add(tabs, "spanx, grow, pushy, wrap rel"); } /** diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java index ad3c0f40b..0cac6bca9 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java @@ -75,12 +75,12 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel "" + trans.get("lbl.motorMounts") + "")); MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket); - subpanel.add(mountConfigPanel, "grow"); - this.add(subpanel, "split, growy"); + subpanel.add(mountConfigPanel, "grow, pushy"); + this.add(subpanel, "split, growy, pushy"); } cards = new JPanel(new CardLayout()); - this.add(cards); + this.add(cards, "pushy"); JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors")); cards.add(helpText, HELP_LABEL ); @@ -90,7 +90,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel BorderFactory.createEtchedBorder(), "" + trans.get("MotorConfigurationPanel.lbl.motorConfiguration") + "")); JScrollPane scroll = new JScrollPane(table); - configurationPanel.add(scroll, "spanx, grow, wrap"); + configurationPanel.add(scroll, "spanx, grow, pushy, wrap"); //// Select motor selectMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectMotor")); @@ -134,7 +134,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel cards.add(configurationPanel, TABLE_LABEL ); - this.add(cards, "gapleft para, grow, wrap"); + this.add(cards, "gapleft para, grow, pushy, wrap"); // Set 'Enter' key action to open the motor selection dialog table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java index d1e914c09..dceb85424 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java @@ -41,7 +41,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel