From 5642c291d755aa98054b594c07924b6d9d1c42b8 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Sun, 17 Jan 2016 14:04:13 +0200 Subject: [PATCH] Fixed default initial editor size --- app/src/processing/app/Editor.java | 12 ++++++------ app/src/processing/app/EditorConsole.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index aea36a4c7..566cabf1c 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -339,12 +339,6 @@ public class Editor extends JFrame implements RunnerListener { pane.setTransferHandler(new FileDropHandler()); - // Finish preparing Editor (formerly found in Base) - pack(); - - // Set the window bounds and the divider location before setting it visible - setPlacement(storedLocation, defaultLocation); - // Set the minimum size for the editor window setMinimumSize(scale(new Dimension( PreferencesData.getInteger("editor.window.width.min"), @@ -353,6 +347,12 @@ public class Editor extends JFrame implements RunnerListener { // Bring back the general options for the editor applyPreferences(); + // Finish preparing Editor (formerly found in Base) + pack(); + + // Set the window bounds and the divider location before setting it visible + setPlacement(storedLocation, defaultLocation); + // Open the document that was passed in boolean loaded = handleOpenInternal(file); if (!loaded) sketch = null; diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index 686fb9014..851f46e8a 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -104,8 +104,8 @@ public class EditorConsole extends JScrollPane { int height = metrics.getAscent() + metrics.getDescent(); int lines = PreferencesData.getInteger("console.lines"); int sizeFudge = 6; //10; // unclear why this is necessary, but it is - setPreferredSize(new Dimension(1024, (height * lines) + sizeFudge)); - setMinimumSize(new Dimension(1024, (height * 5) + sizeFudge)); + setPreferredSize(new Dimension(100, (height * lines) + sizeFudge)); + setMinimumSize(new Dimension(100, (height * 5) + sizeFudge)); EditorConsole.init(stdOutStyle, System.out, stdErrStyle, System.err); }