]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/checkbox.cpp
fixes
[wxWidgets.git] / src / motif / checkbox.cpp
index edf3f857fde08a3b1fea5d972f97185cc70c4f87..7d40ee43305fd59d3ab83a25eb6047c741c4f625 100644 (file)
@@ -66,12 +66,13 @@ 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);
 
     ChangeBackgroundColour();
-    SetFont(* parent->GetFont());
-
     return TRUE;
 }
 
@@ -151,18 +152,29 @@ void wxCheckBoxCallback (Widget w, XtPointer clientData,
   item->ProcessCommand (event);
 }
 
-void wxCheckBox::ChangeFont()
+void wxCheckBox::ChangeFont(bool keepOriginalSize)
 {
-    // TODO
+    wxWindow::ChangeFont(keepOriginalSize);
 }
 
 void wxCheckBox::ChangeBackgroundColour()
 {
-    // TODO
+  wxComputeColours (XtDisplay((Widget) m_mainWidget), & m_backgroundColour,
+                           (wxColour*) NULL);
+
+  XtVaSetValues ((Widget) m_mainWidget,
+                  XmNbackground, g_itemColors[wxBACK_INDEX].pixel,
+                  XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel,
+                  XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel,
+                  XmNforeground, g_itemColors[wxFORE_INDEX].pixel,
+                  NULL);
+
+  XtVaSetValues ((Widget) m_mainWidget,
+                  XmNselectColor, g_itemColors[wxSELE_INDEX].pixel,
+               NULL);
 }
 
 void wxCheckBox::ChangeForegroundColour()
 {
-    // TODO
+    wxWindow::ChangeForegroundColour();
 }
-