mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Slightly improved layout of problems dialog
This commit is contained in:
parent
1e1fdab079
commit
3b39d334c9
1 changed files with 17 additions and 17 deletions
|
@ -63,7 +63,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
private Group info;
|
private Group info;
|
||||||
private Label infoDesc;
|
private Label infoDesc;
|
||||||
private Label infoMessage;
|
private Label infoMessage;
|
||||||
private Label infoParams;
|
//private Label infoParams;
|
||||||
private Button infoButton;
|
private Button infoButton;
|
||||||
private ProblemsTreeEditor checkedTreeEditor;
|
private ProblemsTreeEditor checkedTreeEditor;
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
private void createInfoControl(Composite comp) {
|
private void createInfoControl(Composite comp) {
|
||||||
info = new Group(comp, SWT.NONE);
|
info = new Group(comp, SWT.NONE);
|
||||||
info.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
info.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
info.setLayout(new GridLayout(3, false));
|
info.setLayout(new GridLayout(2, false));
|
||||||
info.setText(CodanUIMessages.CodanPreferencePage_Info);
|
info.setText(CodanUIMessages.CodanPreferencePage_Info);
|
||||||
GridDataFactory gdLab = GridDataFactory.swtDefaults()
|
GridDataFactory gdLab = GridDataFactory.swtDefaults()
|
||||||
.align(SWT.BEGINNING, SWT.BEGINNING).grab(false, false);
|
.align(SWT.BEGINNING, SWT.BEGINNING).grab(false, false);
|
||||||
|
@ -152,27 +152,27 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
labelMessage.setText(CodanUIMessages.CodanPreferencePage_MessageLabel);
|
labelMessage.setText(CodanUIMessages.CodanPreferencePage_MessageLabel);
|
||||||
labelMessage.setLayoutData(gdLab.create());
|
labelMessage.setLayoutData(gdLab.create());
|
||||||
infoMessage = new Label(info, SWT.WRAP);
|
infoMessage = new Label(info, SWT.WRAP);
|
||||||
infoMessage.setLayoutData(gdFact.copy().span(2, 1).create());
|
infoMessage.setLayoutData(gdFact.copy().create());
|
||||||
// description
|
// description
|
||||||
Label labelDesc = new Label(info, SWT.NONE);
|
// Label labelDesc = new Label(info, SWT.NONE);
|
||||||
labelDesc.setText(CodanUIMessages.CodanPreferencePage_Description);
|
// labelDesc.setText(CodanUIMessages.CodanPreferencePage_Description);
|
||||||
labelDesc.setLayoutData(gdLab.create());
|
// labelDesc.setLayoutData(gdLab.create());
|
||||||
infoDesc = new Label(info, SWT.WRAP);
|
infoDesc = new Label(info, SWT.WRAP);
|
||||||
PixelConverter pixelConverter = new PixelConverter(comp);
|
PixelConverter pixelConverter = new PixelConverter(comp);
|
||||||
infoDesc.setLayoutData(gdFact
|
infoDesc.setLayoutData(gdFact
|
||||||
.copy()
|
.copy()
|
||||||
.span(2, 1)
|
.span(2, 1)
|
||||||
.hint(pixelConverter.convertWidthInCharsToPixels(60),
|
.hint(SWT.DEFAULT,
|
||||||
pixelConverter.convertHeightInCharsToPixels(3))
|
pixelConverter.convertHeightInCharsToPixels(3))
|
||||||
.create());
|
.create());
|
||||||
// params
|
// params
|
||||||
Label labelParams = new Label(info, SWT.NONE);
|
// Label labelParams = new Label(info, SWT.NONE);
|
||||||
labelParams.setText(CodanUIMessages.CodanPreferencePage_Parameters);
|
// labelParams.setText(CodanUIMessages.CodanPreferencePage_Parameters);
|
||||||
labelParams.setLayoutData(gdLab.create());
|
// labelParams.setLayoutData(gdLab.create());
|
||||||
infoParams = new Label(info, SWT.NONE);
|
// infoParams = new Label(info, SWT.NONE);
|
||||||
infoParams.setLayoutData(gdFact.create());
|
// infoParams.setLayoutData(gdFact.create());
|
||||||
infoButton = new Button(info, SWT.PUSH);
|
infoButton = new Button(info, SWT.PUSH);
|
||||||
infoButton.setLayoutData(GridDataFactory.swtDefaults()
|
infoButton.setLayoutData(GridDataFactory.swtDefaults().span(2, 1)
|
||||||
.align(SWT.END, SWT.BEGINNING).create());
|
.align(SWT.END, SWT.BEGINNING).create());
|
||||||
infoButton.setText(CodanUIMessages.CodanPreferencePage_Customize);
|
infoButton.setText(CodanUIMessages.CodanPreferencePage_Customize);
|
||||||
infoButton.addSelectionListener(new SelectionAdapter() {
|
infoButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -248,7 +248,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
if (selectedProblem == null) {
|
if (selectedProblem == null) {
|
||||||
infoMessage.setText(""); //$NON-NLS-1$
|
infoMessage.setText(""); //$NON-NLS-1$
|
||||||
infoDesc.setText(""); //$NON-NLS-1$
|
infoDesc.setText(""); //$NON-NLS-1$
|
||||||
infoParams.setText(""); //$NON-NLS-1$
|
//infoParams.setText(""); //$NON-NLS-1$
|
||||||
infoButton.setEnabled(false);
|
infoButton.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
IProblemPreference pref = selectedProblem.getPreference();
|
IProblemPreference pref = selectedProblem.getPreference();
|
||||||
|
@ -262,9 +262,9 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
}
|
}
|
||||||
infoMessage.setText(message);
|
infoMessage.setText(message);
|
||||||
infoDesc.setText(description);
|
infoDesc.setText(description);
|
||||||
infoParams
|
// infoParams
|
||||||
.setText(pref == null ? CodanUIMessages.CodanPreferencePage_NoInfo
|
// .setText(pref == null ? CodanUIMessages.CodanPreferencePage_NoInfo
|
||||||
: CodanUIMessages.CodanPreferencePage_HasPreferences);
|
// : CodanUIMessages.CodanPreferencePage_HasPreferences);
|
||||||
infoButton.setEnabled(true);
|
infoButton.setEnabled(true);
|
||||||
}
|
}
|
||||||
info.layout(true);
|
info.layout(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue