Skip to content

Commit 5642c29

Browse files
committed
Fixed default initial editor size
1 parent 639d991 commit 5642c29

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/src/processing/app/Editor.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,6 @@ public void windowDeactivated(WindowEvent e) {
339339

340340
pane.setTransferHandler(new FileDropHandler());
341341

342-
// Finish preparing Editor (formerly found in Base)
343-
pack();
344-
345-
// Set the window bounds and the divider location before setting it visible
346-
setPlacement(storedLocation, defaultLocation);
347-
348342
// Set the minimum size for the editor window
349343
setMinimumSize(scale(new Dimension(
350344
PreferencesData.getInteger("editor.window.width.min"),
@@ -353,6 +347,12 @@ public void windowDeactivated(WindowEvent e) {
353347
// Bring back the general options for the editor
354348
applyPreferences();
355349

350+
// Finish preparing Editor (formerly found in Base)
351+
pack();
352+
353+
// Set the window bounds and the divider location before setting it visible
354+
setPlacement(storedLocation, defaultLocation);
355+
356356
// Open the document that was passed in
357357
boolean loaded = handleOpenInternal(file);
358358
if (!loaded) sketch = null;

app/src/processing/app/EditorConsole.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public EditorConsole() {
104104
int height = metrics.getAscent() + metrics.getDescent();
105105
int lines = PreferencesData.getInteger("console.lines");
106106
int sizeFudge = 6; //10; // unclear why this is necessary, but it is
107-
setPreferredSize(new Dimension(1024, (height * lines) + sizeFudge));
108-
setMinimumSize(new Dimension(1024, (height * 5) + sizeFudge));
107+
setPreferredSize(new Dimension(100, (height * lines) + sizeFudge));
108+
setMinimumSize(new Dimension(100, (height * 5) + sizeFudge));
109109

110110
EditorConsole.init(stdOutStyle, System.out, stdErrStyle, System.err);
111111
}

0 commit comments

Comments
 (0)