From b566c0b09048bfd4061418c1a5873522bb9239d8 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Wed, 13 Apr 2016 21:46:05 -0400 Subject: [PATCH] tmf: Update setting of minimum size of dialog box Change-Id: I6a5e722c5a435ea8d34eafe8312a429c710f0503 Signed-off-by: Bernd Hufmann Reviewed-on: https://git.eclipse.org/r/70606 Reviewed-by: Patrick Tasse Tested-by: Patrick Tasse Reviewed-by: Hudson CI --- .../tmf/ui/views/timegraph/ShowFindDialogAction.java | 2 -- .../tmf/ui/views/timegraph/TimeGraphFindDialog.java | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/ShowFindDialogAction.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/ShowFindDialogAction.java index d2ad6ac9cc..e67ec296af 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/ShowFindDialogAction.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/ShowFindDialogAction.java @@ -24,7 +24,6 @@ import org.eclipse.ui.IWorkbenchPart; */ class ShowFindDialogAction extends Action { - private static final int SHELL_MINIMUM_SIZE = 320; private static TimeGraphFindDialog fDialog; private FindTarget fFindTarget; @@ -50,7 +49,6 @@ class ShowFindDialogAction extends Action { if (fDialog != null) { fDialog.update(findTarget); fDialog.open(); - fDialog.getShell().setMinimumSize(SHELL_MINIMUM_SIZE, SHELL_MINIMUM_SIZE); } } diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/TimeGraphFindDialog.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/TimeGraphFindDialog.java index 8168c93be9..4fe01ca825 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/TimeGraphFindDialog.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/TimeGraphFindDialog.java @@ -223,6 +223,8 @@ class TimeGraphFindDialog extends Dialog { // get find string initFindStringFromSelection(); + shell.setMinimumSize(shell.getSize()); + // set dialog position if (fDialogPositionInit != null) { shell.setBounds(fDialogPositionInit); @@ -499,7 +501,11 @@ class TimeGraphFindDialog extends Dialog { panel.setLayout(layout); fStatusLabel = new Label(panel, SWT.LEFT); + fStatusLabel.setText(Messages.TimeGraphFindDialog_StatusWrappedLabel); setGridData(fStatusLabel, SWT.FILL, true, SWT.CENTER, false); + GridData gd = (GridData) fStatusLabel.getLayoutData(); + gd.widthHint = fStatusLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x; + fStatusLabel.setText(""); //$NON-NLS-1$ Composite buttonSection = new Composite(panel, SWT.NULL); GridLayout buttonLayout = new GridLayout(); -- 2.34.1