Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2010-12-22 16:07:14 +0000
committerFelipe Heidrich2010-12-22 16:07:14 +0000
commit451a05ed8a440aad529f54987a55625d066a017b (patch)
tree3ca6aa9b088712f037abf14ee9f00f89562bc6a2 /bundles/org.eclipse.swt/Eclipse SWT/motif
parentb14db539fe12b49e50e778b0a2c169c9ee2c936e (diff)
downloadeclipse.platform.swt-451a05ed8a440aad529f54987a55625d066a017b.tar.gz
eclipse.platform.swt-451a05ed8a440aad529f54987a55625d066a017b.tar.xz
eclipse.platform.swt-451a05ed8a440aad529f54987a55625d066a017b.zip
Bug 333002 - Composite#minimumSize ignores clientArea origin
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
index a78c7e4279..59792a197a 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
@@ -932,11 +932,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);
}

Back to the top