wxGTK became a little too eager in using the best size after my change in 1.453; only use it if width or height are not specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e4de95f8d5
commit
c7e111cd98
@ -3009,13 +3009,13 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
}
|
||||
|
||||
// calculate the best size if we should auto size the window
|
||||
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) ||
|
||||
(sizeFlags & wxSIZE_AUTO_HEIGHT) )
|
||||
if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) ||
|
||||
((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) )
|
||||
{
|
||||
const wxSize sizeBest = GetBestSize();
|
||||
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
|
||||
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 )
|
||||
width = sizeBest.x;
|
||||
if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
|
||||
if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 )
|
||||
height = sizeBest.y;
|
||||
}
|
||||
|
||||
|
@ -3009,13 +3009,13 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
||||
}
|
||||
|
||||
// calculate the best size if we should auto size the window
|
||||
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) ||
|
||||
(sizeFlags & wxSIZE_AUTO_HEIGHT) )
|
||||
if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) ||
|
||||
((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) )
|
||||
{
|
||||
const wxSize sizeBest = GetBestSize();
|
||||
if ( sizeFlags & wxSIZE_AUTO_WIDTH )
|
||||
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 )
|
||||
width = sizeBest.x;
|
||||
if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
|
||||
if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 )
|
||||
height = sizeBest.y;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user