Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-05-20 15:20:46 +0000
committerStéphane Bégaudeau2016-05-20 15:20:46 +0000
commit34c319c6d9b3eec05bf9eb4df4315a00bc80f771 (patch)
tree1164412e5f9c95217b1d1cf893f23e8a262efe85
parent06233c020e16b1a262091984f37e82aa0cda1d40 (diff)
downloadorg.eclipse.eef-34c319c6d9b3eec05bf9eb4df4315a00bc80f771.tar.gz
org.eclipse.eef-34c319c6d9b3eec05bf9eb4df4315a00bc80f771.tar.xz
org.eclipse.eef-34c319c6d9b3eec05bf9eb4df4315a00bc80f771.zip
Fix an issue with the width of the text area.
Change-Id: I30fe92d179b61fc6b5fa1a57a77597a639ea614f Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java
index 991fc1b9f..e2f5765a0 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java
@@ -45,6 +45,13 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager {
/**
+ * This constant is used in order to tell SWT that the text area should be 300px wide even if it is not useful. The
+ * layout data should work by themselves but it seems that there is a bug with SWT so, this useless information on
+ * the width of the text area make it work. Don't ask me why :)
+ */
+ private static final int TEXT_AREA_WIDTH_HINT = 300;
+
+ /**
* The description.
*/
private EEFTextDescription description;
@@ -111,6 +118,7 @@ public class EEFTextLifecycleManager extends AbstractEEFWidgetLifecycleManager {
this.text = widgetFactory.createStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.MULTI);
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
gridData.minimumHeight = lineCount * text.getLineHeight();
+ gridData.widthHint = TEXT_AREA_WIDTH_HINT;
this.text.setLayoutData(gridData);
} else {
this.text = widgetFactory.createStyledText(parent, SWT.SINGLE);

Back to the top