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:
@@ -169,6 +169,7 @@ protected:
|
||||
// override some base class virtuals
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
|
@@ -851,6 +851,24 @@ void wxGenericCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
|
||||
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()
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
|
Reference in New Issue
Block a user