]> git.saurik.com Git - wxWidgets.git/commitdiff
Made wxInfoBar::SetFont() change the text message font.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:54:24 +0000 (22:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 5 Oct 2009 22:54:24 +0000 (22:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/infobar.h
src/generic/infobar.cpp

index 9b2109028f4ffedbfdcd9ea191aa7dc4d05b8079..f107549907f02244491831f7af0dbac3f9ba69df 100644 (file)
@@ -66,6 +66,14 @@ public:
     // get the currently used effect animation duration
     int GetEffectDuration() const { return m_effectDuration; }
 
+
+    // overridden base class methods
+    // -----------------------------
+
+    // setting the font of this window sets it for the text control inside it
+    // (default font is a larger and bold version of the normal one)
+    virtual bool SetFont(const wxFont& font);
+
 private:
     // common part of all ctors
     void Init();
index db8708a56bc7c1430974028c0193bf3ee55dee91..549f20617d9fc103b769638878d8481e54b80cad 100644 (file)
@@ -108,6 +108,18 @@ bool wxInfoBar::Create(wxWindow *parent, wxWindowID winid)
     return true;
 }
 
+bool wxInfoBar::SetFont(const wxFont& font)
+{
+    if ( !wxInfoBarBase::SetFont(font) )
+        return false;
+
+    // check that we're not called before Create()
+    if ( m_text )
+        m_text->SetFont(font);
+
+    return true;
+}
+
 void wxInfoBar::UpdateParent()
 {
     wxWindow * const parent = wxGetTopLevelParent(GetParent());