// Instead, use the sizes of the margins. This is equivalent to calling control.computeSize(...)
// if the childControl returned 0@0 for its preferred size.
if (childControl instanceof Composite) {
Composite composite = (Composite) childControl;
if (composite.getChildren().length == 0) {
EnhancedFillLayout layout = (EnhancedFillLayout) control.getLayout();
int w = widthHint == SWT.DEFAULT ? layout.xmargin * 2 : widthHint;
int h = heightHint == SWT.DEFAULT ? layout.ymargin * 2 : heightHint;
return new Point(w, h);
}
}