Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-02-29 00:47:38 +0000
committerSusan Franklin2008-02-29 00:47:38 +0000
commiteaeff13c27c437032c4df30fa14e165a9757899a (patch)
treee09c3954074f11a19ddb3893934104a067770a90
parent5a556dd3b81b2bec55e7812c38368d09846f6272 (diff)
downloadrt.equinox.p2-eaeff13c27c437032c4df30fa14e165a9757899a.tar.gz
rt.equinox.p2-eaeff13c27c437032c4df30fa14e165a9757899a.tar.xz
rt.equinox.p2-eaeff13c27c437032c4df30fa14e165a9757899a.zip
Bug 220830 - [ui] Huge install wizard dialog
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AcceptLicensesWizardPage.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java4
3 files changed, 15 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AcceptLicensesWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AcceptLicensesWizardPage.java
index a59ecd2e2..6ec51e125 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AcceptLicensesWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AcceptLicensesWizardPage.java
@@ -152,7 +152,11 @@ public class AcceptLicensesWizardPage extends WizardPage {
label.setText(ProvUIMessages.AcceptLicensesWizardPage_LicenseTextLabel);
licenseTextBox = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP | SWT.READ_ONLY);
licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- gd = new GridData(GridData.FILL_BOTH);
+ initializeDialogUnits(licenseTextBox);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.widthHint = convertWidthInCharsToPixels(80);
+ gd.heightHint = convertHeightInCharsToPixels(20);
+
licenseTextBox.setLayoutData(gd);
createLicenseAcceptSection(composite, !singleLicense);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
index fd2cac070..4c1a33c53 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
@@ -55,6 +55,14 @@ public abstract class IUPropertyPage extends PropertyPage {
return Dialog.convertWidthInCharsToPixels(fontMetrics, nchars);
}
+ protected int computeHeightLimit(Control control, int nchars) {
+ GC gc = new GC(control);
+ gc.setFont(control.getFont());
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+ return Dialog.convertHeightInCharsToPixels(fontMetrics, nchars);
+ }
+
protected abstract Control createIUPage(Composite parent, IInstallableUnit iu);
protected void showURL(URL url) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java
index fff5ef142..d3e854089 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java
@@ -40,9 +40,9 @@ public class IULicensePropertyPage extends IUPropertyPage {
composite.setLayout(layout);
Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, false, true);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = computeWidthLimit(text, 80);
- gd.grabExcessVerticalSpace = true;
+ gd.heightHint = computeHeightLimit(text, 20);
text.setLayoutData(gd);
text.setText(license.getBody());
text.setEditable(false);

Back to the top