X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/321db4b6bf15df209942b9c0e6c744c8e7074d1b..5b6ec9803a058368a1b240a22d444c7301c5715a:/src/motif/radiobut.cpp diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 69e95f82b0..d73b55569b 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -47,6 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, SetValidator(validator); m_backgroundColour = parent->GetBackgroundColour(); m_foregroundColour = parent->GetForegroundColour(); + m_windowFont = parent->GetFont(); if (parent) parent->AddChild(this); @@ -63,6 +64,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, XmString text = XmStringCreateSimple ((char*) (const char*) label1); + XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget)); Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle", #if wxUSE_GADGETS @@ -70,6 +72,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, #else xmToggleButtonWidgetClass, parentWidget, #endif + XmNfontList, fontList, XmNlabelString, text, XmNfillOnSelect, True, XmNindicatorType, XmONE_OF_MANY, // diamond-shape @@ -86,7 +89,6 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y); - SetFont(* parent->GetFont()); ChangeBackgroundColour(); return TRUE; @@ -111,9 +113,9 @@ void wxRadioButton::Command (wxCommandEvent & event) ProcessCommand (event); } -void wxRadioButton::ChangeFont() +void wxRadioButton::ChangeFont(bool keepOriginalSize) { - wxWindow::ChangeFont(); + wxWindow::ChangeFont(keepOriginalSize); } void wxRadioButton::ChangeBackgroundColour()