diff options
| author | Robin Stocker | 2013-09-20 19:52:01 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2013-09-24 18:00:50 +0000 |
| commit | 612a50f73640e54157cd7213f1e867c65713e638 (patch) | |
| tree | a5d22522aab1ebd2f76395e123c36e58452e8cdc | |
| parent | f350f9230f91a74928986fefe812bd91e29ac8d6 (diff) | |
| download | eclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.tar.gz eclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.tar.xz eclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.zip | |
Bug 19462 - [Wizards] WizardDialog always reserves space for progressbar
By only creating the progress monitor part if the wizard needs one, we
can save some vertical space. Other parts of the code already check
needsProgressMonitor before accessing the progress monitor.
Also, remove unnecessary top and bottom margin around progress monitor
part to save some space even if it is needed.
Change-Id: Ibdd1440df01435dac0800c69bc90a3119afedd7e
Signed-off-by: Robin Stocker <robin@nibor.org>
| -rw-r--r-- | bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java index 3c57f4c2547..8b7645511f7 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java @@ -635,16 +635,20 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2, gd.heightHint = pageHeight; pageContainer.setLayoutData(gd); pageContainer.setFont(parent.getFont()); - // Insert a progress monitor - progressMonitorPart= createProgressMonitorPart(composite, new GridLayout()); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - progressMonitorPart.setLayoutData(gridData); - progressMonitorPart.setVisible(false); + if (wizard.needsProgressMonitor()) { + // Insert a progress monitor + GridLayout layout = new GridLayout(); + layout.marginHeight = 0; + progressMonitorPart= createProgressMonitorPart(composite, layout); + GridData gridData = new GridData(GridData.FILL_HORIZONTAL); + progressMonitorPart.setLayoutData(gridData); + progressMonitorPart.setVisible(false); + applyDialogFont(progressMonitorPart); + } // Build the separator line Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - applyDialogFont(progressMonitorPart); return composite; } |
