diff options
author | Sebastian Bauer | 2013-03-19 08:20:05 +0000 |
---|---|---|
committer | Sergey Prigogin | 2013-03-25 12:49:01 +0000 |
commit | 40d48177487f43b2da1d010802f8a8314f02f2fc (patch) | |
tree | 31c206ea68d12ae1bf815fe33d386e8620717070 | |
parent | c7ccb1c5f1febdb78e9d9007c17bbd467954af67 (diff) | |
download | org.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.tar.gz org.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.tar.xz org.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.zip |
[Bug 317353] Reduce space requirements of various prefs pages
The area covered by CDT prefs pages has been always quite huge. Often,
the scroll bar of the virtual composite has to be displayed although the
components could display all the required information readily in a
smaller box. This is an attempt to reduce some of the fixed space
requirements. The solution is not ideal, but the layout framework of SWT
(no notation of minimum size) and the way how sizes are computed in
prefs page by jface doesn't allow a more sophisticated solution at this
time.
Change-Id: I5f9aa36d0d37b93852a39d636719be801a2c1360
Reviewed-on: https://git.eclipse.org/r/11299
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
4 files changed, 5 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java index 4cfadb749f5..29beef99ca1 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java @@ -98,7 +98,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf private static final String PROFILE_PAGE = "profilePage"; //$NON-NLS-1$ private static final String PROFILE_ID = "profileId"; //$NON-NLS-1$ private static final String PROFILE_NAME = "name"; //$NON-NLS-1$ - private static final int DEFAULT_HEIGHT = 150; + private static final int DEFAULT_HEIGHT = 15; private static final int[] DEFAULT_SASH_WEIGHTS = new int[] { 10, 20 }; private Label fTableDefinition; private Combo scopeComboBox; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java index 30a59cce1a5..42539fb9db0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java @@ -14,6 +14,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; +import org.eclipse.jface.layout.PixelConverter; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; @@ -86,6 +87,7 @@ public class BuildLogPreferencePage extends PropertyPage implements ICOptionCont public void modifyText(ModifyEvent e) { } }); + ((GridData)logLocationText.getLayoutData()).widthHint = new PixelConverter(parent).convertWidthInCharsToPixels(40); // [Browse...] browseButton = ControlFactory.createPushButton(contents, PreferencesMessages.BuildLogPreferencePage_Browse); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java index 4b088de3f26..cc2cdf99188 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java @@ -220,7 +220,7 @@ public class CFileTypesPreferenceBlock { gridData = new GridData(GridData.FILL_BOTH); gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; - gridData.heightHint = SWTUtil.getTableHeightHint(table, 25); + gridData.heightHint = SWTUtil.getTableHeightHint(table, 15); gridData.widthHint = new PixelConverter(parent).convertWidthInCharsToPixels(60); tblLayout.addColumnData(new ColumnWeightData(20)); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java index cf9f9f73299..58279739ce8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java @@ -353,7 +353,7 @@ implements GridData gd; parentComposite = new Composite(c, SWT.NONE); parentComposite.setLayoutData(gd= new GridData(GridData.FILL_BOTH)); - gd.widthHint= 800; + gd.widthHint= 600; itabs.clear(); if (!isSingle()) { parentComposite.setLayout(new FillLayout()); |