diff options
author | Silenio Quarti <silenio> | 2010-12-22 16:12:52 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2010-12-22 16:12:52 +0000 |
commit | b2bcb4e02ea2b58a788c842d7652415a3a7c0690 (patch) | |
tree | 292e0d76a299de6c99af1a56bba7750a49dd6825 /bundles/org.eclipse.swt/Eclipse SWT/wpf | |
parent | 451a05ed8a440aad529f54987a55625d066a017b (diff) | |
download | eclipse.platform.swt-b2bcb4e02ea2b58a788c842d7652415a3a7c0690.tar.gz eclipse.platform.swt-b2bcb4e02ea2b58a788c842d7652415a3a7c0690.tar.xz eclipse.platform.swt-b2bcb4e02ea2b58a788c842d7652415a3a7c0690.zip |
Bug 333002 - Composite#minimumSize ignores clientArea origin
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.java | 5 |
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); } |