X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b5f3fe655deeb91d5d3abe8fad30c4a1cae63dc..e29b83a455bead3dae44300f631d07aa9635d3e9:/src/motif/checkbox.cpp?ds=inline diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 7d40ee4330..ed697a0c19 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -42,6 +42,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, m_windowStyle = style; m_backgroundColour = parent->GetBackgroundColour(); m_foregroundColour = parent->GetForegroundColour(); + m_windowFont = parent->GetFont(); if (parent) parent->AddChild(this); @@ -54,9 +55,11 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, XmString text = XmStringCreateSimple (label1); Widget parentWidget = (Widget) parent->GetClientWidget(); + XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget)); m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle", xmToggleButtonWidgetClass, parentWidget, + XmNfontList, fontList, XmNlabelString, text, NULL); XmStringFree (text); @@ -66,9 +69,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE); - m_windowFont = parent->GetFont(); - ChangeFont(FALSE); - SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);