From ffb030d40a1dbe13e983ee2fd87364f5b5137de0 Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Tue, 23 Jul 2002 03:52:23 +0000 Subject: [PATCH] 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 --- .../com/threerings/media/FrameRepaintManager.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/FrameRepaintManager.java b/src/java/com/threerings/media/FrameRepaintManager.java index 385f3e08b..dafcdaa30 100644 --- a/src/java/com/threerings/media/FrameRepaintManager.java +++ b/src/java/com/threerings/media/FrameRepaintManager.java @@ -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; import java.applet.Applet; import java.awt.Component; +import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; import java.awt.Image; @@ -349,7 +350,15 @@ public class FrameRepaintManager extends RepaintManager // some components are ill-behaved and may throw an // exception while painting themselves, and so we // 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); + g.setFont(ofont); + } catch (Exception e) { Log.warning("Exception while painting component " + "[comp=" + ocomp + ", e=" + e + "].");