X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f41cb81efc453b1da2e29078ef95c64016532cf3..87df17a11b0017d31c09f767bd921abb27193bee:/src/generic/calctrl.cpp diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index a6a8779994..40259f8b94 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -472,10 +472,9 @@ wxSize wxCalendarCtrl::DoGetBestSize() const wxCoord width = 7*m_widthCol, height = 7*m_heightRow; - wxSize sizeCombo = m_comboMonth->GetBestSize(), - sizeSpin = m_spinYear->GetBestSize(); - - height += VERT_MARGIN + wxMax(sizeCombo.y, sizeSpin.y); + // the combobox doesn't report its height correctly (it returns the + // height including the drop down list) so don't use it + height += VERT_MARGIN + m_spinYear->GetBestSize().y; if ( GetWindowStyle() & (wxRAISED_BORDER | wxSUNKEN_BORDER) ) {