summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2010-12-22 16:04:34 +0000
committerSilenio Quarti <silenio>2010-12-22 16:04:34 +0000
commit6c62584502f91f6934d2aa0fffae0f9d17481560 (patch)
tree367d519be94f30b21c2aa1544db32e843d0b97f0 /bundles/org.eclipse.swt
parentd7cb8cba304206bb652927c3da2bb193e45da650 (diff)
downloadeclipse.platform.swt-6c62584502f91f6934d2aa0fffae0f9d17481560.tar.gz
eclipse.platform.swt-6c62584502f91f6934d2aa0fffae0f9d17481560.tar.xz
eclipse.platform.swt-6c62584502f91f6934d2aa0fffae0f9d17481560.zip
Bug 333002 - Composite#minimumSize ignores clientArea origin
Diffstat (limited to 'bundles/org.eclipse.swt')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index a7ff638e64..1b492af826 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -865,11 +865,12 @@ void markLayout (boolean changed, boolean all) {
Point minimumSize (int wHint, int Hint, 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);
}