backported fix to wxSpinCtrl::GetClientSize() in wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -161,6 +161,8 @@ wxMSW:
|
|||||||
- Fixed rendering of borders for wxTextCtrl with wxTE_RICH(2) style when
|
- Fixed rendering of borders for wxTextCtrl with wxTE_RICH(2) style when
|
||||||
using Windows XP's Classic UI theme.
|
using Windows XP's Classic UI theme.
|
||||||
- Text controls with wxTE_RICH style now also generate wxClipboardTextEvents.
|
- Text controls with wxTE_RICH style now also generate wxClipboardTextEvents.
|
||||||
|
- Fixed wxSpinCtrl::GetClientSize() to return sensible value and not just
|
||||||
|
spin button's client size.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -94,6 +94,10 @@ protected:
|
|||||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
virtual void DoGetSize(int *width, int *height) const;
|
virtual void DoGetSize(int *width, int *height) const;
|
||||||
|
#if wxABI_VERSION >= 20808
|
||||||
|
virtual void DoGetClientSize(int *x, int *y) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
virtual void DoSetToolTip( wxToolTip *tip );
|
virtual void DoSetToolTip( wxToolTip *tip );
|
||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
@@ -681,6 +681,19 @@ void wxSpinCtrl::DoGetSize(int *x, int *y) const
|
|||||||
*y = ctrlrect.bottom - ctrlrect.top;
|
*y = ctrlrect.bottom - ctrlrect.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSpinCtrl::DoGetClientSize(int *x, int *y) const
|
||||||
|
{
|
||||||
|
RECT spinrect = wxGetClientRect(GetHwnd());
|
||||||
|
RECT textrect = wxGetClientRect(GetBuddyHwnd());
|
||||||
|
RECT ctrlrect;
|
||||||
|
UnionRect(&ctrlrect,&textrect, &spinrect);
|
||||||
|
|
||||||
|
if ( x )
|
||||||
|
*x = ctrlrect.right - ctrlrect.left;
|
||||||
|
if ( y )
|
||||||
|
*y = ctrlrect.bottom - ctrlrect.top;
|
||||||
|
}
|
||||||
|
|
||||||
void wxSpinCtrl::DoGetPosition(int *x, int *y) const
|
void wxSpinCtrl::DoGetPosition(int *x, int *y) const
|
||||||
{
|
{
|
||||||
// hack: pretend that our HWND is the text control just for a moment
|
// hack: pretend that our HWND is the text control just for a moment
|
||||||
|
Reference in New Issue
Block a user