diff --git a/platform/lang-impl/src/com/intellij/find/impl/FindPopupPanel.java b/platform/lang-impl/src/com/intellij/find/impl/FindPopupPanel.java index 14b18f0072d8..8df73cdef039 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/FindPopupPanel.java +++ b/platform/lang-impl/src/com/intellij/find/impl/FindPopupPanel.java @@ -199,7 +199,7 @@ public class FindPopupPanel extends JBPanel implements FindUI { Dimension panelSize = getPreferredSize(); Dimension prev = DimensionService.getInstance().getSize(SERVICE_KEY); if (!myCbPreserveCase.isVisible()) { - panelSize.width += myCbPreserveCase.getPreferredSize().width + 4; + panelSize.width += myCbPreserveCase.getPreferredSize().width + 8; } panelSize.height *= 2; if (prev != null && prev.height < panelSize.height) prev.height = panelSize.height; @@ -311,6 +311,8 @@ public class FindPopupPanel extends JBPanel implements FindUI { AnAction myShowFilterPopupAction = new AnAction() { @Override public void actionPerformed(AnActionEvent e) { + if (PlatformDataKeys.CONTEXT_COMPONENT.getData(e.getDataContext()) == null) return; + ListPopup listPopup = JBPopupFactory.getInstance().createActionGroupPopup(null, switchContextGroup, e.getDataContext(), false, null, 10); listPopup.showUnderneathOf(myFilterContextButton); @@ -607,15 +609,15 @@ public class FindPopupPanel extends JBPanel implements FindUI { scopesPanel.add(myScopeSelectionToolbar.getComponent()); scopesPanel.add(myScopeDetailsPanel, "growx, pushx"); - setLayout(new MigLayout("flowx, ins 4, fillx, hidemode 2, gap 0")); + setLayout(new MigLayout("flowx, ins 4, fillx, hidemode 2, gap 0 0 0 8")); add(myTitleLabel, "gapleft 4, sx 2, growx, pushx, growy"); - add(myCbCaseSensitive, "gapright 8"); - add(myCbPreserveCase, "gapright 8"); - add(myCbWholeWordsOnly, "gapright 8"); - add(myCbRegularExpressions); - add(RegExHelpPopup.createRegExLink("
?", myCbRegularExpressions, LOG), "gapright 8"); - add(myCbFileFilter); - add(myFileMaskField, "gapright 8"); + add(myCbCaseSensitive); + add(myCbPreserveCase); + add(myCbWholeWordsOnly); + add(myCbRegularExpressions, "gapright 0"); + add(RegExHelpPopup.createRegExLink("?", myCbRegularExpressions, LOG), "gapright 16"); + add(myCbFileFilter, "gapright 0"); + add(myFileMaskField, "gapright 16"); add(myFilterContextButton, "wrap"); add(mySearchTextArea, "pushx, growx, sx 10, gaptop 4, wrap"); add(myReplaceTextArea, "pushx, growx, sx 10, wrap");