summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index 005b716971..3b46425e1a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -145,12 +145,21 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
if (hHint != SWT.DEFAULT) size.y = hHint;
width = Math.max (width, size.x);
height = Math.max (height, size.y);
+ Rectangle trim = computeTrim (0, 0, width, height);
+ width = trim.width; height = trim.height;
return new Point (width, height);
}
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
- return new Rectangle(x-2, y-33, width+4, height+35);
+ int clientHandle = clientHandle ();
+ int clientX = OS.GTK_WIDGET_X (clientHandle);
+ int clientY = OS.GTK_WIDGET_Y (clientHandle);
+ x -= clientX;
+ y -= clientY;
+ width += clientX + clientX;
+ height += clientX + clientY;
+ return new Rectangle (x, y, width, height);
}
void createHandle (int index) {