Make wxCalendarCtrl work on OS/2's PM port as well (patch #1523304).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2006-07-16 20:49:29 +00:00
parent 40a33c46e3
commit 63403da780

View File

@ -790,7 +790,7 @@ void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth )
{
wxSize sizeCombo = m_comboMonth->GetSize();
wxSize sizeCombo = m_comboMonth->GetBestFittingSize();
wxSize sizeStatic = m_staticMonth->GetSize();
wxSize sizeSpin = m_spinYear->GetSize();
@ -826,7 +826,7 @@ void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
void wxCalendarCtrl::DoGetPosition(int *x, int *y) const
{
wxControl::DoGetPosition(x, y);
#ifndef __WXPM__
if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && GetMonthControl() )
{
// our real top corner is not in this position
@ -835,13 +835,14 @@ void wxCalendarCtrl::DoGetPosition(int *x, int *y) const
*y -= GetMonthControl()->GetSize().y + VERT_MARGIN;
}
}
#endif
}
void wxCalendarCtrl::DoGetSize(int *width, int *height) const
{
wxControl::DoGetSize(width, height);
if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) )
#ifndef __WXPM__
if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) )
{
// our real height is bigger
if ( height && GetMonthControl())
@ -849,6 +850,7 @@ void wxCalendarCtrl::DoGetSize(int *width, int *height) const
*height += GetMonthControl()->GetSize().y + VERT_MARGIN;
}
}
#endif
}
void wxCalendarCtrl::RecalcGeometry()
@ -886,7 +888,7 @@ void wxCalendarCtrl::RecalcGeometry()
m_widthCol += 2;
m_heightRow += 2;
m_rowOffset = (GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) ? m_heightRow : 0; // conditional in relation to style
m_rowOffset = HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ? m_heightRow : 0; // conditional in relation to style
}
// ----------------------------------------------------------------------------