Added temporary hack workaround to keep text input fields from rendering
themselves with an incorrect font. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1603 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
//
|
//
|
||||||
// $Id: FrameRepaintManager.java,v 1.9 2002/06/25 01:43:29 mdb Exp $
|
// $Id: FrameRepaintManager.java,v 1.10 2002/07/23 03:52:23 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.media;
|
package com.threerings.media;
|
||||||
|
|
||||||
import java.applet.Applet;
|
import java.applet.Applet;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Font;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
@@ -349,7 +350,15 @@ public class FrameRepaintManager extends RepaintManager
|
|||||||
// some components are ill-behaved and may throw an
|
// some components are ill-behaved and may throw an
|
||||||
// exception while painting themselves, and so we
|
// exception while painting themselves, and so we
|
||||||
// needs must deal with these fellows gracefully
|
// needs must deal with these fellows gracefully
|
||||||
|
|
||||||
|
// TODO: strangeness is ensuing with text input fields
|
||||||
|
// that render themselves with the incorrect font
|
||||||
|
// unless we keep it constant ourselves. need to
|
||||||
|
// investigate further and undo this hack.
|
||||||
|
Font ofont = g.getFont();
|
||||||
ocomp.paint(g);
|
ocomp.paint(g);
|
||||||
|
g.setFont(ofont);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.warning("Exception while painting component " +
|
Log.warning("Exception while painting component " +
|
||||||
"[comp=" + ocomp + ", e=" + e + "].");
|
"[comp=" + ocomp + ", e=" + e + "].");
|
||||||
|
|||||||
Reference in New Issue
Block a user