X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61581d48be4b9b8818d5d743dc12c5e1ca2afd0e..0cc77ca0e722eaabe9bc20b9da46cd1a701e2e97:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 92fb7051e9..13645353de 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -753,11 +753,12 @@ wxSize wxCalendarCtrl::DoGetBestSize() const // the combobox doesn't report its height correctly (it returns the // height including the drop down list) so don't use it height += m_spinYear->GetBestSize().y; - } + wxCoord w2= m_comboMonth->GetBestSize().x + HORZ_MARGIN + GetCharWidth()*6; if (width < w2) width=w2; + } if ( !HasFlag(wxBORDER_NONE) ) { @@ -891,7 +892,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) dc.SetTextForeground(*wxBLACK); dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID)); dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID)); - dc.DrawRectangle(x0, y, GetClientSize().x, m_heightRow); + dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow); // Get extent of month-name + year wxCoord monthw, monthh;