X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/321db4b6bf15df209942b9c0e6c744c8e7074d1b..44c4a3348693414bace13852e50d926c1aa9f08b:/src/motif/checkbox.cpp diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index 0c59e67684..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); @@ -70,8 +73,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); ChangeBackgroundColour(); - SetFont(* parent->GetFont()); - return TRUE; } @@ -151,9 +152,9 @@ void wxCheckBoxCallback (Widget w, XtPointer clientData, item->ProcessCommand (event); } -void wxCheckBox::ChangeFont() +void wxCheckBox::ChangeFont(bool keepOriginalSize) { - wxWindow::ChangeFont(); + wxWindow::ChangeFont(keepOriginalSize); } void wxCheckBox::ChangeBackgroundColour()