]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/calctrl.cpp
unselected the current item when unfocusing it in a single selection list control...
[wxWidgets.git] / src / generic / calctrl.cpp
index 176bc6e0f9470e341f8dde76bf69fef103240c1a..dd81cba7fee7c65a8b9732f805bea0a5a198d2c4 100644 (file)
@@ -680,8 +680,11 @@ size_t wxCalendarCtrl::GetWeek(const wxDateTime& date) const
 
 // the constants used for the layout
 #define VERT_MARGIN     5           // distance between combo and calendar
+#ifdef __WXMAC__
+#define HORZ_MARGIN    5           //                            spin
+#else
 #define HORZ_MARGIN    15           //                            spin
-
+#endif
 wxSize wxCalendarCtrl::DoGetBestSize() const
 {
     // calc the size of the calendar
@@ -765,7 +768,7 @@ void wxCalendarCtrl::DoGetSize(int *width, int *height) const
     if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) )
     {
         // our real height is bigger
-        if ( height )
+        if ( height && GetMonthControl())
         {
             *height += GetMonthControl()->GetSize().y + VERT_MARGIN;
         }