X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/feb72429e84a705de867331397ff7b6cbaeec48a..26a12ab34cc822b99eb0c0431a4d299dcc2c32c8:/src/generic/calctrl.cpp?ds=sidebyside diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index ef716d85b2..1660d5d6fe 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -42,7 +42,12 @@ #include "wx/spinctrl.h" -#define _WX_DEFINE_DATE_EVENTS_ +// if wxDatePickerCtrl code doesn't define the date event, do it here as we +// need it as well +#if !wxUSE_DATEPICKCTRL + #define _WX_DEFINE_DATE_EVENTS_ +#endif + #include "wx/calctrl.h" #define DEBUG_PAINT 0 @@ -317,7 +322,7 @@ bool wxCalendarCtrl::Create(wxWindow *parent, // Since we don't paint the whole background make sure that the platform // will use the right one. SetBackgroundColour(GetBackgroundColour()); - + SetHolidayAttrs(); return true; @@ -796,7 +801,7 @@ wxSize wxCalendarCtrl::DoGetBestSize() const wxSize best(width, height); CacheBestSize(best); - return best; + return best; } void wxCalendarCtrl::DoSetSize(int x, int y, @@ -970,7 +975,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) leftarrow[1] = wxPoint(arrowheight / 2, 0); leftarrow[2] = wxPoint(arrowheight / 2, arrowheight - 1); - rightarrow[0] = wxPoint(0, 0); + rightarrow[0] = wxPoint(); rightarrow[1] = wxPoint(arrowheight / 2, arrowheight / 2); rightarrow[2] = wxPoint(0, arrowheight - 1); @@ -979,8 +984,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) wxCoord arrowy = (m_heightRow - arrowheight) / 2; wxCoord larrowx = (m_widthCol - (arrowheight / 2)) / 2; wxCoord rarrowx = ((m_widthCol - (arrowheight / 2)) / 2) + m_widthCol*6; - m_leftArrowRect = wxRect(0, 0, 0, 0); - m_rightArrowRect = wxRect(0, 0, 0, 0); + m_leftArrowRect = m_rightArrowRect = wxRect(); if ( AllowMonthChange() ) {