From 401f9598674216edb373c647596ea92a63bc65b2 Mon Sep 17 00:00:00 2001
From: Jared Adams <jaxad0127@gmail.com>
Date: Mon, 8 Feb 2010 16:31:46 -0700
Subject: Fix finding width of bold text

---
 src/graphics.h                    | 2 ++
 src/gui/widgets/avatarlistbox.cpp | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/graphics.h b/src/graphics.h
index 3adc0ebc..8bacfb9c 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -193,6 +193,8 @@ class Graphics : public gcn::SDLGraphics
          */
         virtual SDL_Surface *getScreenshot();
 
+        gcn::Font *getFont() { return mFont; }
+
     protected:
         SDL_Surface *mScreen;
         int mWidth;
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 69c3dfde..2c82d79c 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -115,7 +115,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
         // Draw Name
         graphics->drawText(text, 15, y);
 
-        width = getFont()->getWidth(text) + 17; // Extra right padding
+        width = graphics->getFont()->getWidth(text) + 17; // Extra right padding
 
         if (width > newWidth)
         {
-- 
cgit v1.2.3-70-g09d2