1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Make Select Configurations Dialog resizable

Fixes #240
This commit is contained in:
Jonah Graham 2023-01-16 14:12:59 -05:00
parent 3feeedfa63
commit 7bcef26f65
2 changed files with 11 additions and 5 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.ui; singleton:=true Bundle-SymbolicName: org.eclipse.cdt.ui; singleton:=true
Bundle-Version: 8.0.0.qualifier Bundle-Version: 8.0.100.qualifier
Bundle-Activator: org.eclipse.cdt.ui.CUIPlugin Bundle-Activator: org.eclipse.cdt.ui.CUIPlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin

View file

@ -18,6 +18,8 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ICheckStateListener;
@ -28,7 +30,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
@ -63,6 +64,11 @@ public class ConfigMultiSelectionDialog extends Dialog {
super(parentShell); super(parentShell);
} }
@Override
protected boolean isResizable() {
return true;
}
@Override @Override
protected void configureShell(Shell shell) { protected void configureShell(Shell shell) {
super.configureShell(shell); super.configureShell(shell);
@ -87,13 +93,13 @@ public class ConfigMultiSelectionDialog extends Dialog {
protected Control createDialogArea(Composite parent) { protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL); Composite composite = new Composite(parent, SWT.NULL);
composite.setFont(parent.getFont()); composite.setFont(parent.getFont());
composite.setLayout(new GridLayout(1, true)); composite.setLayout(GridLayoutFactory.fillDefaults().margins(5, 5).create());
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
// Create the current config table // Create the current config table
table = new Table(composite, table = new Table(composite,
SWT.CHECK | SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION); SWT.CHECK | SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION);
table.setLayoutData(new GridData(GridData.FILL)); table.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
table.setHeaderVisible(true); table.setHeaderVisible(true);
table.setLinesVisible(true); table.setLinesVisible(true);