1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Bug 312342: Make sure the dialog window size is big enough to show all its content.

This commit is contained in:
Marc Khouzam 2010-05-12 15:24:54 +00:00
parent c08f530592
commit 02f73b5ead

View file

@ -71,6 +71,8 @@ public class TracepointActionDialog extends Dialog {
private IExtension[] breakpointActionPageExtensions; private IExtension[] breakpointActionPageExtensions;
private static final Point MINIMUM_SIZE = new Point(440, 540);
/** /**
* Create the dialog * Create the dialog
*/ */
@ -111,7 +113,7 @@ public class TracepointActionDialog extends Dialog {
* Create contents of the dialog * Create contents of the dialog
*/ */
@Override @Override
protected Control createDialogArea(Composite parent) { protected Control createDialogArea(final Composite parent) {
dialogArea = (Composite) super.createDialogArea(parent); dialogArea = (Composite) super.createDialogArea(parent);
final GridLayout gridLayout = new GridLayout(); final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2; gridLayout.numColumns = 2;
@ -132,6 +134,8 @@ public class TracepointActionDialog extends Dialog {
public void widgetSelected(final SelectionEvent e) { public void widgetSelected(final SelectionEvent e) {
try { try {
showActionComposite(); showActionComposite();
Point p = parent.computeSize(MINIMUM_SIZE.x, MINIMUM_SIZE.y);
getShell().setSize(getShell().computeSize(p.x, p.y));
} catch (CoreException e1) { } catch (CoreException e1) {
} }
} }
@ -199,7 +203,7 @@ public class TracepointActionDialog extends Dialog {
*/ */
@Override @Override
protected Point getInitialSize() { protected Point getInitialSize() {
return new Point(500, 375); return MINIMUM_SIZE;
} }
@Override @Override