@@ -153,16 +153,16 @@ public void paintComponent(Graphics screen) {
153
153
154
154
Graphics g = offscreen .getGraphics ();
155
155
if (font == null ) {
156
- font = Theme .getDefaultFont (); // Get optimal font.
157
- if (font == null ) font = Theme .getFont ("header.text.font" );
156
+ font = Theme .getFont ("header.text.font" );
158
157
}
159
-
160
158
g .setFont (font ); // need to set this each time through
161
159
metrics = g .getFontMetrics ();
162
160
fontAscent = metrics .getAscent ();
163
161
//}
164
162
165
- Graphics2D g2 = (Graphics2D ) g ;
163
+ //Graphics2D g2 = (Graphics2D) g;
164
+ //g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
165
+ // RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
166
166
167
167
// set the background for the offscreen
168
168
g .setColor (backgroundColor );
@@ -182,8 +182,9 @@ public void paintComponent(Graphics screen) {
182
182
code .getPrettyName () : code .getFileName ();
183
183
184
184
// if modified, add the li'l glyph next to the name
185
- String text = " " + codeName + " " ;
185
+ String text = " " + codeName + ( code . isModified () ? " \u00A7 " : " " ) ;
186
186
187
+ Graphics2D g2 = (Graphics2D ) g ;
187
188
int textWidth = (int )
188
189
font .getStringBounds (text , g2 .getFontRenderContext ()).getWidth ();
189
190
@@ -206,16 +207,7 @@ public void paintComponent(Graphics screen) {
206
207
g .setColor (textColor [state ]);
207
208
int baseline = (sizeH + fontAscent ) / 2 ;
208
209
//g.drawString(sketch.code[i].name, textLeft, baseline);
209
-
210
- g2 .setRenderingHint (RenderingHints .KEY_TEXT_ANTIALIASING ,
211
- RenderingHints .VALUE_TEXT_ANTIALIAS_ON );
212
-
213
210
g .drawString (text , textLeft , baseline );
214
-
215
- if (code .isModified ()){
216
- g .setColor (Color .RED );
217
- g .drawString ("*" , textLeft - 3 , baseline );
218
- }
219
211
220
212
g .drawImage (pieces [state ][RIGHT ], x , 0 , null );
221
213
x += PIECE_WIDTH - 1 ; // overlap by 1 pixel
0 commit comments