summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2010-12-22 16:03:38 +0000
committerFelipe Heidrich <fheidric>2010-12-22 16:03:38 +0000
commitd7cb8cba304206bb652927c3da2bb193e45da650 (patch)
treecb5ec3eac2ba62685a77f26abf4043da553ecc14 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
parent328e0a713f76a434a808783aa22de3b79d8c2f9f (diff)
downloadeclipse.platform.swt-d7cb8cba304206bb652927c3da2bb193e45da650.tar.gz
eclipse.platform.swt-d7cb8cba304206bb652927c3da2bb193e45da650.tar.xz
eclipse.platform.swt-d7cb8cba304206bb652927c3da2bb193e45da650.zip
Bug 333002 - Composite#minimumSize ignores clientArea origin
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 39beb4d8e1..e1486d94af 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -826,11 +826,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);
}