]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/statbox.cpp
#ifdefed out Ole... functions for Cygwin.
[wxWidgets.git] / src / motif / statbox.cpp
index 01a76c9157c250e19969e224810aa633201d7363..487d56710bf19a02b876697431a024c27a0a83eb 100644 (file)
@@ -53,6 +53,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
     m_labelWidget = (WXWidget) 0;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
+    m_windowFont = parent->GetFont();
 
     SetName(name);
 
@@ -78,10 +79,13 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
 
     if (hasLabel)
     {
+        XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
         wxString label1(wxStripMenuCodes(label));
         XmString text = XmStringCreateSimple ((char*) (const char*) label1);
         m_labelWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) label1,
                                             xmLabelWidgetClass, formWidget,
+                                             XmNfontList, fontList,
                                             XmNlabelString, text,
                                             NULL);
         XmStringFree (text);
@@ -181,9 +185,9 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
     }
 }
 
-void wxStaticBox::ChangeFont()
+void wxStaticBox::ChangeFont(bool keepOriginalSize)
 {
-    wxWindow::ChangeFont();
+    wxWindow::ChangeFont(keepOriginalSize);
 }
 
 void wxStaticBox::ChangeBackgroundColour()