Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-11-18 21:00:20 +0000
committerRyan D. Brooks2010-11-18 21:00:20 +0000
commit27f2e3009479032ec389fc7bf1d0922d17a54ba2 (patch)
tree70f83cf6856830d452442f3ba469f0af719607c5 /plugins
parent964afd46a1e56f1137fd87c3c00d729c52f9208d (diff)
downloadorg.eclipse.osee-27f2e3009479032ec389fc7bf1d0922d17a54ba2.tar.gz
org.eclipse.osee-27f2e3009479032ec389fc7bf1d0922d17a54ba2.tar.xz
org.eclipse.osee-27f2e3009479032ec389fc7bf1d0922d17a54ba2.zip
refinement: Fix XFileTextWithSelectionDialog layout
Make XFileTextWithSelectionDialog display label, text, and button on the same line
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFileTextWithSelectionDialog.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XText.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFileTextWithSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFileTextWithSelectionDialog.java
index fb06bde3af3..50444bc146a 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFileTextWithSelectionDialog.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFileTextWithSelectionDialog.java
@@ -54,7 +54,11 @@ public class XFileTextWithSelectionDialog extends XText {
@Override
public void createControls(final Composite parent, int horizontalSpan, boolean fillText) {
- super.createControls(parent, horizontalSpan, fillText);
+ int lhspan = horizontalSpan;
+ if (!verticalLabel && lhspan < 3) {
+ lhspan = 3;
+ }
+ super.createControls(parent, lhspan, fillText);
Button fileDialog = new Button(getStyledText().getParent(), SWT.NONE);
fileDialog.setText("Select " + type.name());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XText.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XText.java
index c279231a280..0c86b82deb3 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XText.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XText.java
@@ -146,7 +146,7 @@ public class XText extends XWidget {
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
} else {
composite = new Composite(parent, SWT.NONE);
- GridLayout layout = ALayout.getZeroMarginLayout(2, false);
+ GridLayout layout = ALayout.getZeroMarginLayout(horizontalSpan, false);
layout.verticalSpacing = 4;
composite.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);

Back to the top