X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47bc1060127d86222768789575295254a710f5a6..5de5db0eb14aa86b5b177050720deb0f4c210fba:/src/motif/statbox.cpp?ds=inline diff --git a/src/motif/statbox.cpp b/src/motif/statbox.cpp index b695120c8f..487d56710b 100644 --- a/src/motif/statbox.cpp +++ b/src/motif/statbox.cpp @@ -51,6 +51,9 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, { m_formWidget = (WXWidget) 0; m_labelWidget = (WXWidget) 0; + m_backgroundColour = parent->GetBackgroundColour(); + m_foregroundColour = parent->GetForegroundColour(); + m_windowFont = parent->GetFont(); SetName(name); @@ -76,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); @@ -112,7 +118,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) frameWidget, pos.x, pos.y, size.x, size.y); - ChangeColour(m_mainWidget); + ChangeBackgroundColour(); return TRUE; } @@ -179,3 +185,18 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags) } } +void wxStaticBox::ChangeFont(bool keepOriginalSize) +{ + wxWindow::ChangeFont(keepOriginalSize); +} + +void wxStaticBox::ChangeBackgroundColour() +{ + wxWindow::ChangeBackgroundColour(); +} + +void wxStaticBox::ChangeForegroundColour() +{ + wxWindow::ChangeForegroundColour(); +} +