diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/window.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 2b6c4ef58..bdf3f5b7c 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -94,6 +94,7 @@ Window::Window(const std::string &caption, bool modal, Window *parent, setVisible(false); addWidgetListener(this); + mCaptionFont = getFont(); } Window::~Window() @@ -154,7 +155,7 @@ void Window::draw(gcn::Graphics *graphics) if (mShowTitle) { g->setColor(Theme::getThemeColor(Theme::TEXT)); - g->setFont(getFont()); + g->setFont(mCaptionFont); g->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT); } diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index f455f1238..4e9a6d87b 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -384,6 +384,9 @@ class Window : public gcn::Window, gcn::WidgetListener bool isResizeAllowed(gcn::MouseEvent &event); + void setCaptionFont(gcn::Font *font) + { mCaptionFont = font; } + private: enum ResizeHandles { @@ -442,6 +445,7 @@ class Window : public gcn::Window, gcn::WidgetListener static const unsigned resizeBorderWidth = 10; GraphicsVertexes *mVertexes; bool mRedraw; + gcn::Font *mCaptionFont; }; #endif |