From 019022505089dd45f9beba77fc033bdc67d242e6 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 27 Mar 2017 12:52:41 +0200 Subject: [PATCH] Allow setting low values as minimum console size Fixes #6085 when setting console.lines=0 in preferences.txt --- app/src/processing/app/EditorConsole.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index 851f46e8a..b32382354 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -103,9 +103,8 @@ public class EditorConsole extends JScrollPane { FontMetrics metrics = getFontMetrics(actualFont); 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(100, (height * lines) + sizeFudge)); - setMinimumSize(new Dimension(100, (height * 5) + sizeFudge)); + setPreferredSize(new Dimension(100, (height * lines))); + setMinimumSize(new Dimension(100, (height * lines))); EditorConsole.init(stdOutStyle, System.out, stdErrStyle, System.err); }