]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/checkbox.cpp
MacHandleControlClick extended by mouseStillDown state for supporting things like...
[wxWidgets.git] / src / motif / checkbox.cpp
index 79ae861a60779be52573f7c9292bab940d6ddab7..144e2c47d129505a5b5cdc77dd9c637e87b9e183 100644 (file)
@@ -56,13 +56,12 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     wxXmString text( label1 );
     
     Widget parentWidget = (Widget) parent->GetClientWidget();
-    XmFontList fontList =
-        (XmFontList) m_font.GetFontList(1.0, XtDisplay(parentWidget));
 
     m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
         xmToggleButtonWidgetClass, parentWidget,
-        XmNfontList, fontList,
+        wxFont::GetFontTag(), m_font.GetFontType(XtDisplay(parentWidget)),
         XmNlabelString, text(),
+        XmNrecomputeSize, False,
         NULL);
     
     XtAddCallback( (Widget)m_mainWidget,
@@ -71,7 +70,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 
     XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
 
-    SetCanAddEventHandler(TRUE);
     AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
                   pos.x, pos.y, size.x, size.y );
 
@@ -123,7 +121,7 @@ void wxCheckBox::ChangeBackgroundColour()
         XmNforeground, g_itemColors[wxFORE_INDEX].pixel,
         NULL);
 
-    int selectPixel = wxBLACK->AllocColour(wxGetDisplay());
+    int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget));
 
     // Better to have the checkbox selection in black, or it's
     // hard to determine what state it is in.