X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bcf0c7d6ea7c1a7f64c7b1b6564f7d75e1cfbfa..4a46a5df879c4f820d0a0a435b34c7d5e4793991:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index e6341247b3..14c60e5267 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -121,7 +121,7 @@ wxMonthComboBox::wxMonthComboBox(wxCalendarCtrl *cal) wxDefaultPosition, wxDefaultSize, 0, NULL, - wxCB_READONLY) + wxCB_READONLY | wxCLIP_SIBLINGS) { m_cal = cal; @@ -140,7 +140,7 @@ wxYearSpinCtrl::wxYearSpinCtrl(wxCalendarCtrl *cal) cal->GetDate().Format(_T("%Y")), wxDefaultPosition, wxDefaultSize, - wxSP_ARROW_KEYS, + wxSP_ARROW_KEYS | wxCLIP_SIBLINGS, -4300, 10000, cal->GetDate().GetYear()) { m_cal = cal; @@ -169,9 +169,8 @@ void wxCalendarCtrl::Init() m_attrs[n] = NULL; } - wxSystemSettings ss; - m_colHighlightFg = ss.GetSystemColour(wxSYS_COLOUR_HIGHLIGHTTEXT); - m_colHighlightBg = ss.GetSystemColour(wxSYS_COLOUR_HIGHLIGHT); + m_colHighlightFg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + m_colHighlightBg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); m_colHolidayFg = *wxRED; // don't set m_colHolidayBg - by default, same as our bg colour @@ -189,7 +188,8 @@ bool wxCalendarCtrl::Create(wxWindow *parent, const wxString& name) { if ( !wxControl::Create(parent, id, pos, size, - style | wxWANTS_CHARS, wxDefaultValidator, name) ) + style | wxCLIP_CHILDREN | wxWANTS_CHARS, + wxDefaultValidator, name) ) { return FALSE; } @@ -824,7 +824,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) // Get extent of month-name + year wxCoord monthw, monthh; - wxString headertext = m_date.Format("%B %Y"); + wxString headertext = m_date.Format(wxT("%B %Y")); dc.GetTextExtent(headertext, &monthw, &monthh); // draw month-name centered above weekdays