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-12-09 19:48:53 +0000
committerCarolyn MacLeod <carolyn>2003-12-09 19:48:53 +0000
commit51fe9118e4dfe1321d2d353d11812c882a152f04 (patch)
tree8f67206d7b0d844d3acbbb4570aa44c3c5e78f8f /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java
parentc9c8e0bdb4124f50c4f26484080d8b99b8540b96 (diff)
downloadeclipse.platform.swt-51fe9118e4dfe1321d2d353d11812c882a152f04.tar.gz
eclipse.platform.swt-51fe9118e4dfe1321d2d353d11812c882a152f04.tar.xz
eclipse.platform.swt-51fe9118e4dfe1321d2d353d11812c882a152f04.zip
inline getNativeSize
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.java9
1 files changed, 7 insertions, 2 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 24101f72d3..4325176968 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
@@ -120,8 +120,13 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
int clientY = OS.GTK_WIDGET_Y (clientHandle);
x -= clientX;
y -= clientY;
- Point defaultSize = computeNativeSize (handle, SWT.DEFAULT, SWT.DEFAULT, true);
- width = Math.max (width + clientX + clientX, defaultSize.x);
+ int oldWidth = OS.GTK_WIDGET_WIDTH (handle);
+ int oldHeight = OS.GTK_WIDGET_HEIGHT (handle);
+ OS.gtk_widget_set_size_request (handle, -1, -1);
+ GtkRequisition requisition = new GtkRequisition ();
+ OS.gtk_widget_size_request (handle, requisition);
+ OS.gtk_widget_set_size_request (handle, oldWidth, oldHeight);
+ width = Math.max (width + clientX + clientX, requisition.width);
height += clientX + clientY;
return new Rectangle (x, y, width, height);
}