summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
diff options
context:
space:
mode:
authorCarolyn MacLeod <carolyn>2003-11-27 16:11:58 +0000
committerCarolyn MacLeod <carolyn>2003-11-27 16:11:58 +0000
commite9cb28cdd789082d90216aefbf144869f8874451 (patch)
tree2cbed0fd4e8b97428ad0a4adc2def717f22f6e4e /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
parentf7c2b4d4f5b65ab8e4f31a85c54f929e017c15bc (diff)
downloadeclipse.platform.swt-e9cb28cdd789082d90216aefbf144869f8874451.tar.gz
eclipse.platform.swt-e9cb28cdd789082d90216aefbf144869f8874451.tar.xz
eclipse.platform.swt-e9cb28cdd789082d90216aefbf144869f8874451.zip
Removed computeSize from Group, and moved the logic into computeTrim.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
index a4b826fabe..24101f72d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
@@ -91,28 +91,6 @@ int clientHandle () {
return clientHandle;
}
-public Point computeSize (int wHint, int hHint, boolean changed) {
- checkWidget ();
- if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
- if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
- Point defaultSize = computeNativeSize (handle, wHint, hHint, changed);
- Point size;
- if (layout != null) {
- size = layout.computeSize (this, wHint, hHint, changed);
- } else {
- size = minimumSize ();
- }
- int width = size.x, height = size.y;
- if (width == 0) width = DEFAULT_WIDTH;
- if (height == 0) height = DEFAULT_HEIGHT;
- if (wHint != SWT.DEFAULT) width = wHint;
- if (hHint != SWT.DEFAULT) height = hHint;
- Rectangle trim = computeTrim (0, 0, width, height);
- width = Math.max (trim.width, defaultSize.x);
- height = trim.height;
- return new Point (width, height);
-}
-
/**
* Given a desired <em>client area</em> for the receiver
* (as described by the arguments), returns the bounding
@@ -142,7 +120,8 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
int clientY = OS.GTK_WIDGET_Y (clientHandle);
x -= clientX;
y -= clientY;
- width += clientX + clientX;
+ Point defaultSize = computeNativeSize (handle, SWT.DEFAULT, SWT.DEFAULT, true);
+ width = Math.max (width + clientX + clientX, defaultSize.x);
height += clientX + clientY;
return new Rectangle (x, y, width, height);
}