diff options
| author | Mickael Istria | 2017-09-19 12:04:08 +0000 |
|---|---|---|
| committer | Mickael Istria | 2017-10-10 12:59:37 +0000 |
| commit | 965c3254cc4bbbb436472ff8ea6cf9765987f796 (patch) | |
| tree | e75907c1a2f4e35958de440f26ef1eccc3c43497 | |
| parent | 8749cc964f7bea5c813f0bb6e0bdde27fed5d46d (diff) | |
| download | eclipse.platform.ui-965c3254cc4bbbb436472ff8ea6cf9765987f796.tar.gz eclipse.platform.ui-965c3254cc4bbbb436472ff8ea6cf9765987f796.tar.xz eclipse.platform.ui-965c3254cc4bbbb436472ff8ea6cf9765987f796.zip | |
Bug 522418 - Quick Access result popup should be bigger
Change-Id: Id755dec99b8c72e3fd52fc72f8f36e64815279e5
Signed-off-by: Mickael Istria <mistria@redhat.com>
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java index 4e1894b50e4..bc1a93389ff 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java @@ -489,13 +489,13 @@ public class SearchField { Display display = txtQuickAccess.getDisplay(); Rectangle tempBounds = txtQuickAccess.getBounds(); Rectangle compBounds = display.map(txtQuickAccess, null, tempBounds); - int preferredWidth = dialogWidth == -1 ? 350 : dialogWidth; + Rectangle shellBounds = txtQuickAccess.getShell().getBounds(); + int preferredWidth = dialogWidth == -1 ? Math.max(300, (int) (shellBounds.width * 0.6)) : dialogWidth; int width = Math.max(preferredWidth, compBounds.width); - int height = dialogHeight == -1 ? 250 : dialogHeight; + int height = dialogHeight == -1 ? Math.max(200, (int) (shellBounds.height * 0.9)) : dialogHeight; // If size would extend past the right edge of the shell, try to move it // to the left of the text - Rectangle shellBounds = txtQuickAccess.getShell().getBounds(); if (compBounds.x + width > shellBounds.x + shellBounds.width){ compBounds.x = Math.max(shellBounds.x, (compBounds.x + compBounds.width - width)); } |
