Fixed wxDatePickerCtrl under OS X

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-04-19 17:22:23 +00:00
parent f79386c61a
commit d7b20621ef
2 changed files with 19 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ protected:
// override some base class virtuals // override some base class virtuals
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoGetSize(int *width, int *height) const;
private: private:
// common part of all ctors // common part of all ctors

View File

@@ -851,6 +851,24 @@ void wxGenericCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
wxControl::DoMoveWindow(x, y + yDiff, width, height - yDiff); wxControl::DoMoveWindow(x, y + yDiff, width, height - yDiff);
} }
void wxGenericCalendarCtrl::DoGetSize(int *width, int *height) const
{
#ifdef __WXMAC__
wxControl::DoGetSize( width, height );
if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth && height )
{
wxSize sizeCombo = m_comboMonth->GetEffectiveMinSize();
wxSize sizeSpin = m_spinYear->GetSize();
int maxHeight = wxMax(sizeSpin.y, sizeCombo.y);
*height += maxHeight + VERT_MARGIN;
}
#else
wxControl::DoGetSize( width, height );
#endif
}
void wxGenericCalendarCtrl::RecalcGeometry() void wxGenericCalendarCtrl::RecalcGeometry()
{ {
wxClientDC dc(this); wxClientDC dc(this);