summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRobin Stocker2013-09-20 15:52:01 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-09-24 14:00:50 (EDT)
commit612a50f73640e54157cd7213f1e867c65713e638 (patch)
treea5d22522aab1ebd2f76395e123c36e58452e8cdc
parentf350f9230f91a74928986fefe812bd91e29ac8d6 (diff)
downloadeclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.zip
eclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.tar.gz
eclipse.platform.ui-612a50f73640e54157cd7213f1e867c65713e638.tar.bz2
Bug 19462 - [Wizards] WizardDialog always reserves space for progressbarrefs/changes/61/16661/3
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.java16
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 3c57f4c..8b76455 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;
}