@@ -89,6 +89,8 @@ public class MessageLogPanel extends JPanel {
89
89
new IndependentControlFunctionHandler (),
90
90
new ControlStringHandler ())
91
91
.build ();
92
+ private static final Color BACKGROUND_COLOR = Color .decode ("#090300" );
93
+ private static final Color DEFAULT_TEXT_COLOR = new Color (204 , 204 , 204 );
92
94
private boolean clearText ;
93
95
94
96
public MessageLogPanel (int numLines ) {
@@ -99,7 +101,8 @@ public MessageLogPanel(int numLines) {
99
101
textComponent .setFont (
100
102
new Font (FlatJetBrainsMonoFont .FAMILY , Font .PLAIN , new JLabel ().getFont ().getSize ()));
101
103
textComponent .setEditable (true );
102
- textComponent .setBackground (Color .decode ("#090300" ));
104
+ textComponent .setBackground (BACKGROUND_COLOR );
105
+ StyleConstants .setForeground (defaultAttributes , DEFAULT_TEXT_COLOR );
103
106
104
107
var caret = (DefaultCaret ) textComponent .getCaret ();
105
108
caret .setUpdatePolicy (DefaultCaret .NEVER_UPDATE );
@@ -162,6 +165,7 @@ private void updateTextComponent() {
162
165
var name = attributes .nextElement ();
163
166
defaultAttributes .removeAttribute (name );
164
167
}
168
+ StyleConstants .setForeground (defaultAttributes , DEFAULT_TEXT_COLOR );
165
169
}
166
170
case 1 -> StyleConstants .setBold (defaultAttributes , true );
167
171
case 3 -> StyleConstants .setItalic (defaultAttributes , true );
@@ -188,8 +192,7 @@ private void updateTextComponent() {
188
192
StyleConstants .setForeground (
189
193
defaultAttributes , new Color (44 , 181 , 233 ));
190
194
case 37 , 39 ->
191
- StyleConstants .setForeground (
192
- defaultAttributes , new Color (204 , 204 , 204 ));
195
+ StyleConstants .setForeground (defaultAttributes , DEFAULT_TEXT_COLOR );
193
196
case 38 -> {
194
197
var secondArgument =
195
198
(int ) functionFragment .getArguments ().get (1 ).getValue ();
0 commit comments