]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/calctrl.cpp
we now send iconize events
[wxWidgets.git] / src / generic / calctrl.cpp
index bc800036523ea2888c4cdc821f1d5ca1c51c8092..40259f8b942492324354d0ebb892089ee8916a09 100644 (file)
@@ -472,15 +472,14 @@ wxSize wxCalendarCtrl::DoGetBestSize() const
     wxCoord width = 7*m_widthCol,
             height = 7*m_heightRow;
 
-    wxSize sizeCombo = m_comboMonth->GetBestSize(),
-           sizeSpin = m_spinYear->GetBestSize();
-
-    height += VERT_MARGIN + wxMax(sizeCombo.y, sizeSpin.y);
+    // the combobox doesn't report its height correctly (it returns the
+    // height including the drop down list) so don't use it
+    height += VERT_MARGIN + m_spinYear->GetBestSize().y;
 
     if ( GetWindowStyle() & (wxRAISED_BORDER | wxSUNKEN_BORDER) )
     {
         // the border would clip the last line otherwise
-        height += 4;
+        height += 6;
     }
 
     return wxSize(width, height);
@@ -648,7 +647,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
 
                 wxCalendarDateAttr *attr = m_attrs[day - 1];
 
-                bool isSel = m_date == date;
+                bool isSel = date.IsSameDate(m_date);
                 if ( isSel )
                 {
                     dc.SetTextForeground(m_colHighlightFg);