Revert "Merge pull request #1886 from deathbeam/cleanup-sidebar"

This reverts commit f1a6267c9742038bb4a771d350291999c3d8431c, reversing
changes made to 2b24b5eaa28735053823b210618318cbbe2afa56.
This commit is contained in:
Adam
2018-04-24 20:38:33 -04:00
parent dea7b1d1ea
commit f1cd66b5b0
2 changed files with 46 additions and 64 deletions

View File

@@ -228,6 +228,17 @@ public class SwingUtil
});
}
/**
* Revalidate minimum frame size.
*
* @param frame the frame
*/
public static void revalidateMinimumSize(final JFrame frame)
{
// The JFrame only respects minimumSize if it was set by setMinimumSize, for some reason. (atleast on windows/native)
frame.setMinimumSize(frame.getLayout().minimumLayoutSize(frame));
}
private static BufferedImage resizeImage(BufferedImage image, int newWidth, int newHeight)
{
final Image tmp = image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);