summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Bauer2013-03-19 04:20:05 (EDT)
committer Sergey Prigogin2013-03-25 08:49:01 (EDT)
commit40d48177487f43b2da1d010802f8a8314f02f2fc (patch)
tree31c206ea68d12ae1bf815fe33d386e8620717070
parentc7ccb1c5f1febdb78e9d9007c17bbd467954af67 (diff)
downloadorg.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.zip
org.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.tar.gz
org.eclipse.cdt-40d48177487f43b2da1d010802f8a8314f02f2fc.tar.bz2
[Bug 317353] Reduce space requirements of various prefs pagesrefs/changes/99/11299/5
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>
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java2
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 4cfadb7..29beef9 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 30a59cc..42539fb 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 4b088de..cc2cdf9 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 cf9f9f7..5827973 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());