mirror of https://github.com/FreeCol/freecol.git
Allows panels to cover the entire mapboard area (that is, all the frame except the menu bar). This is needed for some panels on very small screen.
This commit is contained in:
parent
77b71fdd6a
commit
6b976523ac
|
@ -310,9 +310,8 @@ public final class Canvas extends JDesktopPane {
|
|||
}
|
||||
|
||||
private Dimension capSizeToMaximum(JInternalFrame f, Dimension maxSize) {
|
||||
final int FRAME_EMPTY_SPACE = 60;
|
||||
final int width = Math.max(f.getMinimumSize().width, Math.min(f.getWidth(), maxSize.width - FRAME_EMPTY_SPACE));
|
||||
final int height = Math.max(f.getMinimumSize().height, Math.min(f.getHeight(), maxSize.height - FRAME_EMPTY_SPACE));
|
||||
final int width = Math.max(f.getMinimumSize().width, Math.min(f.getWidth(), maxSize.width));
|
||||
final int height = Math.max(f.getMinimumSize().height, Math.min(f.getHeight(), maxSize.height));
|
||||
return new Dimension(width, height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue