mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Using setMinimumSize() instead of window listener for editor windows.
http://code.google.com/p/arduino/issues/detail?id=52
This commit is contained in:
parent
0acebeeff4
commit
cb8e184ab8
@ -288,19 +288,9 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
setPlacement(location);
|
setPlacement(location);
|
||||||
|
|
||||||
|
|
||||||
// If the window is resized too small this will resize it again to the
|
// Set the minimum size for the editor window
|
||||||
// minimums. Adapted by Chris Lonnen from comments here:
|
setMinimumSize(new Dimension(Preferences.getInteger("editor.window.width.min"),
|
||||||
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4320050
|
Preferences.getInteger("editor.window.height.min")));
|
||||||
// as a fix for http://dev.processing.org/bugs/show_bug.cgi?id=25
|
|
||||||
final int minW = Preferences.getInteger("editor.window.width.min");
|
|
||||||
final int minH = Preferences.getInteger("editor.window.height.min");
|
|
||||||
addComponentListener(new java.awt.event.ComponentAdapter() {
|
|
||||||
public void componentResized(ComponentEvent event) {
|
|
||||||
setSize((getWidth() < minW) ? minW : getWidth(),
|
|
||||||
(getHeight() < minH) ? minH : getHeight());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// System.out.println("t3");
|
// System.out.println("t3");
|
||||||
|
|
||||||
// Bring back the general options for the editor
|
// Bring back the general options for the editor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user