moved wxWindow::GetBestSize implementation into DoGetBestSize to make it easier to support both prototypes in derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -291,17 +291,17 @@ wxInt32 wxSlider::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent )
|
||||
|
||||
/* This is overloaded in wxSlider so that the proper width/height will always be used
|
||||
* for the slider different values would cause redrawing and mouse detection problems */
|
||||
void wxSlider::SetSizeHints( int minW, int minH,
|
||||
int maxW , int maxH ,
|
||||
int incW , int incH )
|
||||
void wxSlider::DoSetSizeHints( int minW, int minH,
|
||||
int maxW , int maxH ,
|
||||
int incW , int incH )
|
||||
{
|
||||
wxSize size = GetBestSize();
|
||||
|
||||
if(GetWindowStyle() & wxSL_VERTICAL) {
|
||||
wxWindow::SetSizeHints(size.x, minH, size.x, maxH, incW, incH);
|
||||
wxWindow::DoSetSizeHints(size.x, minH, size.x, maxH, incW, incH);
|
||||
}
|
||||
else {
|
||||
wxWindow::SetSizeHints(minW, size.y, maxW, size.y, incW, incH);
|
||||
wxWindow::DoSetSizeHints(minW, size.y, maxW, size.y, incW, incH);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user