1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 08:15:48 +02:00

[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>
This commit is contained in:
Sebastian Bauer 2013-03-19 09:20:05 +01:00 committed by Sergey Prigogin
parent c7ccb1c5f1
commit 40d4817748
4 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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));

View file

@ -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());