From 7fc2d4efc5c27be9ef36ff4aa999bb722287a8be Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Fri, 27 Mar 2020 12:58:18 +0200 Subject: [PATCH] Layout adjustments in element selector dialog. gitlab #84 Change-Id: I28de9ca5e1bc22eef607126ec75dcd3a93263188 --- .../selection/ui/parts/EditSelectorDialog.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/parts/EditSelectorDialog.java b/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/parts/EditSelectorDialog.java index 24df3cc0..a269d5ef 100644 --- a/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/parts/EditSelectorDialog.java +++ b/org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/parts/EditSelectorDialog.java @@ -469,7 +469,7 @@ public class EditSelectorDialog extends Dialog { Composite selectorComposite = new Composite(content, SWT.NONE); GridDataFactory.swtDefaults().applyTo(selectorComposite); - RowLayoutFactory.swtDefaults().applyTo(selectorComposite); + RowLayoutFactory.fillDefaults().applyTo(selectorComposite); nField = new Text(selectorComposite, SWT.BORDER); RowDataFactory.swtDefaults().hint(40, SWT.DEFAULT).applyTo(nField); @@ -493,7 +493,7 @@ public class EditSelectorDialog extends Dialog { RowDataFactory.swtDefaults().hint(40, SWT.DEFAULT).applyTo(selectorField); propertyField = new Combo(selectorComposite, SWT.NONE); - RowDataFactory.swtDefaults().hint(80, SWT.DEFAULT).applyTo(propertyField); + RowDataFactory.swtDefaults().hint(120, SWT.DEFAULT).applyTo(propertyField); propertyField.setItems(propertyLabels.toArray(new String[] {})); { int index = propertyName != null ? propertyNames.indexOf(propertyName) : -1; @@ -524,7 +524,7 @@ public class EditSelectorDialog extends Dialog { Composite sourceComposite = new Composite(content, SWT.NONE); GridDataFactory.swtDefaults().applyTo(sourceComposite); - RowLayoutFactory.swtDefaults().applyTo(sourceComposite); + RowLayoutFactory.fillDefaults().applyTo(sourceComposite); sourceField = new Combo(sourceComposite, SWT.BORDER | SWT.READ_ONLY); RowDataFactory.swtDefaults().applyTo(sourceField); @@ -532,7 +532,7 @@ public class EditSelectorDialog extends Dialog { sourceField.select(generatorIndex); diagramField = new Combo(sourceComposite, SWT.BORDER | SWT.READ_ONLY); - RowDataFactory.swtDefaults().applyTo(diagramField); + RowDataFactory.swtDefaults().hint(120, SWT.DEFAULT).applyTo(diagramField); diagramField.setItems(diagramNames.toArray(new String[diagramNames.size()])); diagramField.setEnabled(isDiagramFieldVisible()); @@ -745,7 +745,7 @@ public class EditSelectorDialog extends Dialog { // Create combo-box Combo routeCombo = new Combo(conditionComp, SWT.READ_ONLY); - RowDataFactory.swtDefaults().applyTo(routeCombo); + RowDataFactory.swtDefaults().hint(120, SWT.DEFAULT).applyTo(routeCombo); routeCombo.setItems(routeNames); // Set current selection @@ -765,7 +765,7 @@ public class EditSelectorDialog extends Dialog { // Create combo-box Combo regionCombo = new Combo(conditionComp, SWT.READ_ONLY); - RowDataFactory.swtDefaults().applyTo(regionCombo); + RowDataFactory.swtDefaults().hint(120, SWT.DEFAULT).applyTo(regionCombo); regionCombo.setItems(regionNames); // Set current selection @@ -784,13 +784,13 @@ public class EditSelectorDialog extends Dialog { ROW_LAYOUT.applyTo(conditionComp); Text lowerLimitText = new Text(conditionComp, SWT.BORDER); - RowDataFactory.swtDefaults().applyTo(lowerLimitText); + RowDataFactory.swtDefaults().hint(40, SWT.DEFAULT).applyTo(lowerLimitText); lowerLimitText.setText(condition.lowerLimit != null ? Double.toString(condition.lowerLimit) : ""); new Label(conditionComp, SWT.NONE).setText("\u2264"); Combo propertyNameText = new Combo(conditionComp, SWT.NONE); - RowDataFactory.swtDefaults().applyTo(propertyNameText); + RowDataFactory.swtDefaults().hint(120, SWT.DEFAULT).applyTo(propertyNameText); propertyNameText.setItems(propertyLabels.toArray(new String[] {})); int index = propertyNames.indexOf(condition.propertyName); if (index >= 0) @@ -801,7 +801,7 @@ public class EditSelectorDialog extends Dialog { new Label(conditionComp, SWT.NONE).setText("\u2264"); Text upperLimitText = new Text(conditionComp, SWT.BORDER); - RowDataFactory.swtDefaults().applyTo(upperLimitText); + RowDataFactory.swtDefaults().hint(40, SWT.DEFAULT).applyTo(upperLimitText); upperLimitText.setText(condition.upperLimit != null ? Double.toString(condition.upperLimit) : ""); // Register update -- 2.47.1