fix problem with large fonts causing the console to disappear (issue #1275)

This commit is contained in:
benfry
2012-10-22 17:46:22 +00:00
parent 81b4a40456
commit 8ca642e9a2
4 changed files with 6 additions and 5 deletions
-3
View File
@@ -234,9 +234,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
// end an undo-chunk any time the caret moves unless it's when text is edited
textarea.addCaretListener(new CaretListener() {
String lastText = textarea.getText();
public void caretUpdate(CaretEvent e) {
String newText = textarea.getText();
if (lastText.equals(newText) && isDirectEdit()) {
@@ -252,7 +250,6 @@ public abstract class Editor extends JFrame implements RunnerListener {
pack();
// Set the window bounds and the divider location before setting it visible
// setPlacement(location);
state.apply(this);
// Set the minimum size for the editor window
@@ -309,7 +309,7 @@ public class JEditTextArea extends JComponent
// http://code.google.com/p/processing/issues/detail?id=280
// http://code.google.com/p/processing/issues/detail?id=316
//setValues(int newValue, int newExtent, int newMin, int newMax)
if ( (-horizontalOffset) > 0 ){
if (horizontalOffset < 0) {
horizontal.setValues(-horizontalOffset, painterWidth, -leftHandGutter, width);
} else {
horizontal.setValues(-leftHandGutter, painterWidth, -leftHandGutter, width);
@@ -139,7 +139,9 @@ public class PdeTextAreaDefaults extends TextAreaDefaults {
caretVisible = true;
caretBlinks = true;
cols = 80;
rows = 15;
// Set the number of rows lower to avoid layout badness with large fonts
// http://code.google.com/p/processing/issues/detail?id=1275
rows = 5;
font = Preferences.getFont("editor.font");
antialias = Preferences.getBoolean("editor.antialias");
+2
View File
@@ -1,4 +1,6 @@
0213 pde
X Console disappears with increased editor font size
X http://code.google.com/p/processing/issues/detail?id=1275
2.0 FINAL / library/tool/mode manager cleanup