remove background color from console text

This commit is contained in:
Ben Fry
2022-01-13 09:56:32 -05:00
parent c86ccdf01b
commit e078f57dae
2 changed files with 11 additions and 7 deletions
+10 -6
View File
@@ -44,10 +44,9 @@ import processing.app.Preferences;
* Message console that sits below the editing area.
*/
public class EditorConsole extends JScrollPane {
static final Color TRANSPARENT = new Color(0, 0, 0, 0);
Editor editor;
Timer flushTimer;
JTextPane consoleTextPane;
BufferedStyledDocument consoleDoc;
@@ -62,6 +61,8 @@ public class EditorConsole extends JScrollPane {
static EditorConsole current;
Timer flushTimer;
public EditorConsole(Editor editor) {
this.editor = editor;
@@ -146,7 +147,10 @@ public class EditorConsole extends JScrollPane {
stdStyle = new SimpleAttributeSet();
StyleConstants.setForeground(stdStyle, fgColorOut);
StyleConstants.setBackground(stdStyle, bgColor);
// Changed to TRANSPARENT because it causes trouble when changing
// the theme color. But it looks like it's not necessary to set it
// anyway, so removing the setBackground() call entirely.
//StyleConstants.setBackground(stdStyle, TRANSPARENT); //bgColor);
StyleConstants.setFontSize(stdStyle, font.getSize());
StyleConstants.setFontFamily(stdStyle, font.getFamily());
StyleConstants.setBold(stdStyle, font.isBold());
@@ -154,7 +158,7 @@ public class EditorConsole extends JScrollPane {
errStyle = new SimpleAttributeSet();
StyleConstants.setForeground(errStyle, fgColorErr);
StyleConstants.setBackground(errStyle, bgColor);
//StyleConstants.setBackground(stdStyle, TRANSPARENT); //bgColor);
StyleConstants.setFontSize(errStyle, font.getSize());
StyleConstants.setFontFamily(errStyle, font.getFamily());
StyleConstants.setBold(errStyle, font.isBold());
@@ -164,7 +168,7 @@ public class EditorConsole extends JScrollPane {
if (lookAndFeel.equals("Nimbus") || lookAndFeel.equals("VAqua")) {
getViewport().setBackground(bgColor);
consoleTextPane.setOpaque(false);
consoleTextPane.setBackground(new Color(0, 0, 0, 0));
consoleTextPane.setBackground(TRANSPARENT);
} else {
consoleTextPane.setBackground(bgColor);
}
+1 -1
View File
@@ -53,8 +53,8 @@ X generate footer icons
_ finish debugging theme update
X update gutter colors on theme update
X update the mode selector colors
X remove background color from console text
_ make sure repaint is happening
_ try removing background color from console text
_ line numbers extending into the horizontal scroll bar
_ white corner on the scroll bar
_ single line at top of editor (editor bg color?)