summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/wpf
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/wpf')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java
index ba183ecad5..bfceaad59a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java
@@ -905,11 +905,12 @@ void markLayout (boolean changed, boolean all) {
Point minimumSize (int wHint, int hHint, boolean changed) {
Control [] children = _getChildren ();
+ Rectangle clientArea = getClientArea();
int width = 0, height = 0;
for (int i=0; i<children.length; i++) {
Rectangle rect = children [i].getBounds ();
- width = Math.max (width, rect.x + rect.width);
- height = Math.max (height, rect.y + rect.height);
+ width = Math.max (width, rect.x - clientArea.x + rect.width);
+ height = Math.max (height, rect.y - clientArea.y + rect.height);
}
return new Point (width, height);
}