@@ -153,16 +153,16 @@ public void paintComponent(Graphics screen) {
153153
154154 Graphics g = offscreen .getGraphics ();
155155 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" );
158157 }
159-
160158 g .setFont (font ); // need to set this each time through
161159 metrics = g .getFontMetrics ();
162160 fontAscent = metrics .getAscent ();
163161 //}
164162
165- Graphics2D g2 = (Graphics2D ) g ;
163+ //Graphics2D g2 = (Graphics2D) g;
164+ //g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
165+ // RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
166166
167167 // set the background for the offscreen
168168 g .setColor (backgroundColor );
@@ -182,8 +182,9 @@ public void paintComponent(Graphics screen) {
182182 code .getPrettyName () : code .getFileName ();
183183
184184 // if modified, add the li'l glyph next to the name
185- String text = " " + codeName + " " ;
185+ String text = " " + codeName + ( code . isModified () ? " \u00A7 " : " " ) ;
186186
187+ Graphics2D g2 = (Graphics2D ) g ;
187188 int textWidth = (int )
188189 font .getStringBounds (text , g2 .getFontRenderContext ()).getWidth ();
189190
@@ -206,16 +207,7 @@ public void paintComponent(Graphics screen) {
206207 g .setColor (textColor [state ]);
207208 int baseline = (sizeH + fontAscent ) / 2 ;
208209 //g.drawString(sketch.code[i].name, textLeft, baseline);
209-
210- g2 .setRenderingHint (RenderingHints .KEY_TEXT_ANTIALIASING ,
211- RenderingHints .VALUE_TEXT_ANTIALIAS_ON );
212-
213210 g .drawString (text , textLeft , baseline );
214-
215- if (code .isModified ()){
216- g .setColor (Color .RED );
217- g .drawString ("*" , textLeft - 3 , baseline );
218- }
219211
220212 g .drawImage (pieces [state ][RIGHT ], x , 0 , null );
221213 x += PIECE_WIDTH - 1 ; // overlap by 1 pixel
0 commit comments