From 10aba52ab8be08acfe59e57ec53f55dde2ab7509 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 3 Dec 2011 16:27:11 -0500 Subject: [PATCH] Making editor font size apply to serial monitor and console (Paul Stoffregen) http://code.google.com/p/arduino/issues/detail?id=550 --- app/src/processing/app/EditorConsole.java | 4 +++- app/src/processing/app/SerialMonitor.java | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index 38cf00fc2..257706c2c 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -88,7 +88,9 @@ public class EditorConsole extends JScrollPane { Color bgColor = Theme.getColor("console.color"); Color fgColorOut = Theme.getColor("console.output.color"); Color fgColorErr = Theme.getColor("console.error.color"); - Font font = Theme.getFont("console.font"); + Font consoleFont = Theme.getFont("console.font"); + Font editorFont = Preferences.getFont("editor.font"); + Font font = new Font(consoleFont.getName(), consoleFont.getStyle(), editorFont.getSize()); stdStyle = new SimpleAttributeSet(); StyleConstants.setForeground(stdStyle, fgColorOut); diff --git a/app/src/processing/app/SerialMonitor.java b/app/src/processing/app/SerialMonitor.java index 009305413..58a9155f8 100644 --- a/app/src/processing/app/SerialMonitor.java +++ b/app/src/processing/app/SerialMonitor.java @@ -62,7 +62,9 @@ public class SerialMonitor extends JFrame implements MessageConsumer { getContentPane().setLayout(new BorderLayout()); - Font font = Theme.getFont("console.font"); + Font consoleFont = Theme.getFont("console.font"); + Font editorFont = Preferences.getFont("editor.font"); + Font font = new Font(consoleFont.getName(), consoleFont.getStyle(), editorFont.getSize()); textArea = new JTextArea(16, 40); textArea.setEditable(false); @@ -225,4 +227,4 @@ public class SerialMonitor extends JFrame implements MessageConsumer { } }}); } -} \ No newline at end of file +}