X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70b6d394128782bdc2454dacbc7a72e347485868..7bd236e6da74203ba429941d3f9643291494b420:/src/generic/calctrl.cpp?ds=inline diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index de55a2c286..cb0b01b5f8 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -788,7 +788,7 @@ void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height) { int yDiff; - if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth ) { wxSize sizeCombo = m_comboMonth->GetSize(); wxSize sizeStatic = m_staticMonth->GetSize(); @@ -816,7 +816,7 @@ void wxCalendarCtrl::DoGetPosition(int *x, int *y) const { wxControl::DoGetPosition(x, y); - if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && GetMonthControl() ) { // our real top corner is not in this position if ( y ) @@ -857,7 +857,7 @@ void wxCalendarCtrl::RecalcGeometry() { // 1.5 times the width gives nice margins even if the weekday // names are short - m_widthCol = width+width/2; + m_widthCol = width+width/2; } } wxDateTime::WeekDay wd; @@ -1211,7 +1211,7 @@ void wxCalendarCtrl::RefreshDate(const wxDateTime& date) Refresh(true, &rect); } -void wxCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate, const wxDateTime& todate, wxPen* pPen, wxBrush* pBrush) +void wxCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pPen, const wxBrush* pBrush) { // Highlights the given range using pen and brush // Does nothing if todate < fromdate @@ -1451,7 +1451,7 @@ wxCalendarHitTestResult wxCalendarCtrl::HitTest(const wxPoint& pos, wxDateTime::WeekDay *wd) { RecalcGeometry(); - // use the correct x-pos + // use the correct x-pos wxCoord x0 = wxMax((GetSize().x - m_widthCol*7) /2, 0); wxPoint pos_corr = pos; pos_corr.x -= x0; @@ -1655,13 +1655,13 @@ void wxCalendarCtrl::OnChar(wxKeyEvent& event) } break; - case WXK_PRIOR: + case WXK_PAGEUP: target = m_date - wxDateSpan::Month(); ChangeMonth(&target); SetDateAndNotify(target); // always break; - case WXK_NEXT: + case WXK_PAGEDOWN: target = m_date + wxDateSpan::Month(); ChangeMonth(&target); SetDateAndNotify(target); // always