summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2002-05-27 16:02:10 +0000
committerSilenio Quarti <silenio>2002-05-27 16:02:10 +0000
commitee5b8a84166385f16be3440675e33b228d751f20 (patch)
tree2a4b524848e0932af003011e3624008797c19ba5 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
parent0db7275306068cc1d18c406ecbe40df861c4e6a1 (diff)
downloadeclipse.platform.swt-ee5b8a84166385f16be3440675e33b228d751f20.tar.gz
eclipse.platform.swt-ee5b8a84166385f16be3440675e33b228d751f20.tar.xz
eclipse.platform.swt-ee5b8a84166385f16be3440675e33b228d751f20.zip
Bug 17305
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java')
-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) {