mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 13:55:39 +02:00
Fix layout and size of browser fields.
Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
c90aeb7d2c
commit
4d53ce0c98
2 changed files with 13 additions and 8 deletions
|
@ -41,7 +41,7 @@ public class RemoteResourceBrowser extends Dialog {
|
||||||
public static final int SINGLE = 0x01;
|
public static final int SINGLE = 0x01;
|
||||||
public static final int MULTI = 0x02;
|
public static final int MULTI = 0x02;
|
||||||
|
|
||||||
private final static int widthHint = 300;
|
private final static int widthHint = 400;
|
||||||
|
|
||||||
private Button okButton;
|
private Button okButton;
|
||||||
private RemoteResourceBrowserWidget fWidget;
|
private RemoteResourceBrowserWidget fWidget;
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
|
|
||||||
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final int widthHint = 300;
|
private static final int minimumWidth = 200;
|
||||||
private static final int heightHint = 300;
|
private static final int heightHint = 300;
|
||||||
|
|
||||||
private RemoteTreeViewer treeViewer;
|
private RemoteTreeViewer treeViewer;
|
||||||
|
@ -151,9 +151,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
|
|
||||||
Label label = new Label(mainComp, SWT.NONE);
|
Label label = new Label(mainComp, SWT.NONE);
|
||||||
label.setText(dialogLabel);
|
label.setText(dialogLabel);
|
||||||
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
|
label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
gd.horizontalSpan = 1;
|
|
||||||
label.setLayoutData(gd);
|
|
||||||
|
|
||||||
remotePathText = new Text(mainComp, SWT.BORDER | SWT.SINGLE);
|
remotePathText = new Text(mainComp, SWT.BORDER | SWT.SINGLE);
|
||||||
remotePathText.addModifyListener(new ModifyListener() {
|
remotePathText.addModifyListener(new ModifyListener() {
|
||||||
|
@ -176,11 +174,12 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
||||||
gd.widthHint = widthHint;
|
gd.minimumWidth = minimumWidth;
|
||||||
remotePathText.setLayoutData(gd);
|
remotePathText.setLayoutData(gd);
|
||||||
|
|
||||||
upButton = new Button(mainComp, SWT.PUSH | SWT.FLAT);
|
upButton = new Button(mainComp, SWT.PUSH | SWT.FLAT);
|
||||||
|
upButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
upButton.setImage(RemoteUIImages.get(RemoteUIImages.IMG_ELCL_UP_NAV));
|
upButton.setImage(RemoteUIImages.get(RemoteUIImages.IMG_ELCL_UP_NAV));
|
||||||
upButton.setToolTipText(Messages.RemoteResourceBrowser_UpOneLevel);
|
upButton.setToolTipText(Messages.RemoteResourceBrowser_UpOneLevel);
|
||||||
upButton.addSelectionListener(new SelectionAdapter() {
|
upButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -195,6 +194,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
if ((optionFlags & SHOW_NEW_FOLDER_BUTTON) != 0) {
|
if ((optionFlags & SHOW_NEW_FOLDER_BUTTON) != 0) {
|
||||||
// new folder: See Bug 396334
|
// new folder: See Bug 396334
|
||||||
newFolderButton = new Button(mainComp, SWT.PUSH | SWT.FLAT);
|
newFolderButton = new Button(mainComp, SWT.PUSH | SWT.FLAT);
|
||||||
|
newFolderButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
newFolderButton.setImage(RemoteUIImages.get(RemoteUIImages.IMG_ELCL_NEW_FOLDER));
|
newFolderButton.setImage(RemoteUIImages.get(RemoteUIImages.IMG_ELCL_NEW_FOLDER));
|
||||||
newFolderButton.setToolTipText(Messages.RemoteResourceBrowser_NewFolder);
|
newFolderButton.setToolTipText(Messages.RemoteResourceBrowser_NewFolder);
|
||||||
newFolderButton.addSelectionListener(new SelectionAdapter() {
|
newFolderButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -245,6 +245,10 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
gd = new GridData(SWT.LEFT, SWT.CENTER, false, false);
|
||||||
|
gd.horizontalSpan = 2;
|
||||||
|
upButton.setLayoutData(gd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((style & SWT.MULTI) == SWT.MULTI) {
|
if ((style & SWT.MULTI) == SWT.MULTI) {
|
||||||
|
@ -252,7 +256,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
} else {
|
} else {
|
||||||
treeViewer = new RemoteTreeViewer(mainComp, SWT.SINGLE | SWT.BORDER);
|
treeViewer = new RemoteTreeViewer(mainComp, SWT.SINGLE | SWT.BORDER);
|
||||||
}
|
}
|
||||||
gd = new GridData(GridData.FILL_BOTH);
|
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||||
gd.horizontalSpan = 4;
|
gd.horizontalSpan = 4;
|
||||||
// see bug 158380
|
// see bug 158380
|
||||||
gd.heightHint = Math.max(parent.getSize().y, heightHint);
|
gd.heightHint = Math.max(parent.getSize().y, heightHint);
|
||||||
|
@ -307,6 +311,7 @@ public class RemoteResourceBrowserWidget extends Composite {
|
||||||
|
|
||||||
if ((optionFlags & SHOW_HIDDEN_CHECKBOX) != 0) {
|
if ((optionFlags & SHOW_HIDDEN_CHECKBOX) != 0) {
|
||||||
final Button showHiddenButton = new Button(mainComp, SWT.CHECK);
|
final Button showHiddenButton = new Button(mainComp, SWT.CHECK);
|
||||||
|
showHiddenButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
|
||||||
showHiddenButton.setText(Messages.RemoteResourceBrowser_Show_hidden_files);
|
showHiddenButton.setText(Messages.RemoteResourceBrowser_Show_hidden_files);
|
||||||
showHiddenButton.addSelectionListener(new SelectionAdapter() {
|
showHiddenButton.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue