提交 558ce121 编写于 作者: S Serge Rider

Minor UI fixes

上级 4e1aaa3a
......@@ -123,9 +123,9 @@ class DBeaverSettingsImporter {
iconLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
Label confirmLabel = new Label(infoGroup, SWT.NONE);
//confirmLabel.setImage(JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_INFO));
confirmLabel.setText("Settings of previous version (" + oldVersion + ") of " + GeneralUtils.getProductName() + " was found at\n" +
confirmLabel.setText("Previous version (" + GeneralUtils.getProductName() + " " + oldVersion + ") settings were found:\n" +
oldDir.getAbsolutePath() + "\n" +
"Do you want to import previous version settings? (Recommended).\n\n" +
"Do you want to import these settings? (Recommended).\n\n" +
"Make sure previous version of " + GeneralUtils.getProductName() + " isn't running");
confirmLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
}
......
......@@ -464,7 +464,7 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
}
@Override
public Control getControl()
public Table getControl()
{
return logTable;
}
......
......@@ -82,7 +82,9 @@ public class PendingTransactionsDialog extends TransactionInfoDialog {
colName.setText("Connection");
TreeColumn colTxn = new TreeColumn(contextTree, SWT.RIGHT);
colTxn.setText("Transaction");
contextTree.setLayoutData(new GridData(GridData.FILL_BOTH));
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = contextTree.getHeaderHeight() + contextTree.getItemHeight() * 5;
contextTree.setLayoutData(gd);
contextTree.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
......@@ -109,7 +111,7 @@ public class PendingTransactionsDialog extends TransactionInfoDialog {
loadContexts(showAllCheck.getSelection());
}
});
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.grabExcessHorizontalSpace = true;
showAllCheck.setLayoutData(gd);
commitButton = UIUtils.createPushButton(controlPanel, "Commit", DBeaverIcons.getImage(UIIcon.TXN_COMMIT));
......
......@@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
......@@ -67,6 +68,10 @@ public abstract class TransactionInfoDialog extends Dialog {
DBCExecutionContext context = getCurrentContext();
QMEventFilter filter = context == null ? VOID_FILTER : createContextFilter(context);
logViewer = new QueryLogViewer(composite, activeEditor.getSite(), filter, false);
final Object gd = logViewer.getControl().getLayoutData();
if (gd instanceof GridData) {
((GridData) gd).heightHint = logViewer.getControl().getHeaderHeight() + logViewer.getControl().getItemHeight() * 5;
}
showAllCheck = UIUtils.createCheckbox(composite, "Show all queries", "Show all transaction queries. Otherwise shows only modifying queries.", false, 1);
showAllCheck.addSelectionListener(new SelectionAdapter() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册