fix(gui): workaround for wrap layout repaint issue in search dialog (PR #2521)

* fix(gui): fixed incorrectly handles full window repaint in search dialog

* fix: fix spotless check
This commit is contained in:
Yaroslav
2025-06-02 23:45:46 +03:00
committed by GitHub
parent 13e934ce4d
commit d492628bfe
@@ -4,6 +4,8 @@ import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
@@ -347,6 +349,8 @@ public class SearchDialog extends CommonSearchDialog {
boolean resSearch = searchOptions.contains(RESOURCE);
resExtFilePanel.setVisible(resSearch);
sizeLimitPanel.setVisible(resSearch);
optionsPanel.revalidate();
optionsPanel.repaint();
});
JPanel searchPane = new JPanel();
@@ -367,6 +371,13 @@ public class SearchDialog extends CommonSearchDialog {
contentPanel.add(buttonPane, BorderLayout.PAGE_END);
getContentPane().add(contentPanel);
addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent e) {
optionsPanel.revalidate();
optionsPanel.repaint();
}
});
setLocationRelativeTo(null);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}