]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Layout adjustments in element selector dialog. 46/4046/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Fri, 27 Mar 2020 10:58:18 +0000 (12:58 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Fri, 27 Mar 2020 11:37:29 +0000 (13:37 +0200)
gitlab #84

Change-Id: I28de9ca5e1bc22eef607126ec75dcd3a93263188

org.simantics.district.selection.ui/src/org/simantics/district/selection/ui/parts/EditSelectorDialog.java

index 24df3cc0732c1329c0fe72729858cc56fc0c204b..a269d5efe3da4cb483f81492e766aacd465929a5 100644 (file)
@@ -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