#1639 Clearing search results for current file

This commit is contained in:
Jindra Petřík
2021-03-06 10:40:24 +01:00
parent d5456772fd
commit c79fac229f
6 changed files with 62 additions and 22 deletions

View File

@@ -211,6 +211,13 @@ public class MainFrameRibbonMenu extends MainFrameMenu {
emptyLabel.setHorizontalAlignment(SwingUtilities.LEFT);
emptyLabel.setEnabled(false);
searchHistoryPanel.addButtonToLastGroup(emptyLabel);
height += emptyLabel.getHeight() + 4 /*layoutGap*/;
} else {
JCommandButton clearButton = new JCommandButton(translate("menu.recentSearches.clear"));
clearButton.setHorizontalAlignment(SwingUtilities.LEFT);
clearButton.addActionListener(this::clearRecentSearchesForCurrentSwfActionPerformed);
searchHistoryPanel.addButtonToLastGroup(clearButton);
height += clearButton.getHeight() + 4 /*layoutGap*/;
}
searchHistoryPanel.setMaxButtonColumns(1);