Skip to content

Commit

Permalink
Fixed default initial editor size
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Jan 26, 2016
1 parent 639d991 commit 5642c29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/src/processing/app/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,6 @@ public void windowDeactivated(WindowEvent e) {

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"),
Expand All @@ -353,6 +347,12 @@ public void windowDeactivated(WindowEvent e) {
// 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;
Expand Down
4 changes: 2 additions & 2 deletions app/src/processing/app/EditorConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public EditorConsole() {
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);
}
Expand Down

0 comments on commit 5642c29

Please sign in to comment.