Skip to content

Commit 5a6aa09

Browse files
committed
Fixing the dialog size. Fixing adding new fieldset
1 parent 07fba9b commit 5a6aa09

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.form

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="12" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="10" left="10" bottom="10" right="10"/>
55
<constraints>
6-
<xy x="48" y="54" width="888" height="657"/>
6+
<xy x="48" y="54" width="1056" height="1327"/>
77
</constraints>
88
<properties>
9-
<preferredSize width="400" height="600"/>
9+
<preferredSize width="838" height="619"/>
1010
</properties>
1111
<border type="none"/>
1212
<children>

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentFormDialog.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ public class NewUiComponentFormDialog extends AbstractDialog {
205205
public NewUiComponentFormDialog(final Project project, final PsiDirectory directory) {
206206
super();
207207
this.project = project;
208-
updateDialogSizeToDefaults();
209208
formButtonsValidator = new FormButtonsValidator(this);
210209
formFieldsetsValidator = new FormFieldsetsValidator(this);
211210
formFieldsValidator = new FormFieldsValidator(this);
@@ -286,9 +285,10 @@ protected void initButtonsTable() {
286285
}
287286

288287
protected void initFieldSetsTable() {
288+
Integer rowPosition = 10;
289289
final DefaultTableModel model = getFieldsetsModel();
290290
model.setDataVector(
291-
new Object[][] {{"General","10",DELETE_COLUMN}},
291+
new Object[][] {{"General", rowPosition, DELETE_COLUMN}},
292292
new Object[] { LABEL_COLUMN, SORT_ORDER_COLUMN, ACTION_COLUMN}
293293
);
294294

@@ -298,7 +298,7 @@ protected void initFieldSetsTable() {
298298
new DeleteRowButton(new JCheckBox()));
299299

300300
addFieldset.addActionListener(e -> {
301-
model.addRow(new Object[] {"","",DELETE_COLUMN});
301+
model.addRow(new Object[] {"", rowPosition + 10, DELETE_COLUMN});
302302
});
303303
model.addTableModelListener(
304304
event -> {
@@ -753,9 +753,4 @@ protected boolean validateFormFields() {
753753
&& formFieldsetsValidator.validate()
754754
&& formFieldsValidator.validate();
755755
}
756-
757-
private void updateDialogSizeToDefaults() {
758-
final Dimension screenSize = getToolkit().getScreenSize();
759-
setPreferredSize(new Dimension(screenSize.width / 2, screenSize.height / 2));
760-
}
761756
}

0 commit comments

Comments
 (0)