mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix problem with large fonts causing the console to disappear (issue #1275)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user