aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-03-20 12:36:12 (EDT)
committerCarolyn MacLeod2013-04-09 10:56:45 (EDT)
commit7d667984c27290eaffb9812a29939951ffc7f1f5 (patch)
treed2749a2c241da4e4a3f90587ab7dfc72461c7827
parent9f7705e0a063815538a8fbffffe1b6d522d9a8e0 (diff)
downloadeclipse.platform.swt-7d667984c27290eaffb9812a29939951ffc7f1f5.zip
eclipse.platform.swt-7d667984c27290eaffb9812a29939951ffc7f1f5.tar.gz
eclipse.platform.swt-7d667984c27290eaffb9812a29939951ffc7f1f5.tar.bz2
Bug 394583 - [ GTK+ 3] TextBox is clipped to the right
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 08fc1a6..10c25e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -559,15 +559,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
OS.g_object_unref (layout);
width = Math.max (width, w [0]);
}
- if (OS.GTK3) {
- GtkRequisition requsition = new GtkRequisition();
- OS.gtk_widget_get_preferred_size(handle, requsition, null);
- if (width == 0) width = requsition.width;
- if (height == 0) height = requsition.height;
- } else {
- if (width == 0) width = DEFAULT_WIDTH;
- if (height == 0) height = DEFAULT_HEIGHT;
- }
+ if (width == 0) width = DEFAULT_WIDTH;
+ if (height == 0) height = DEFAULT_HEIGHT;
width = wHint == SWT.DEFAULT ? width : wHint;
height = hHint == SWT.DEFAULT ? height : hHint;
Rectangle trim = computeTrim (0, 0, width, height);