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:
Vadim Zeitlin
2004-04-01 13:32:16 +00:00
parent e4de95f8d5
commit c7e111cd98
2 changed files with 8 additions and 8 deletions

View File

@@ -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 // calculate the best size if we should auto size the window
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) || if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) ||
(sizeFlags & wxSIZE_AUTO_HEIGHT) ) ((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) )
{ {
const wxSize sizeBest = GetBestSize(); const wxSize sizeBest = GetBestSize();
if ( sizeFlags & wxSIZE_AUTO_WIDTH ) if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 )
width = sizeBest.x; width = sizeBest.x;
if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 )
height = sizeBest.y; height = sizeBest.y;
} }

View File

@@ -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 // calculate the best size if we should auto size the window
if ( (sizeFlags & wxSIZE_AUTO_WIDTH) || if ( ((sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1) ||
(sizeFlags & wxSIZE_AUTO_HEIGHT) ) ((sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1) )
{ {
const wxSize sizeBest = GetBestSize(); const wxSize sizeBest = GetBestSize();
if ( sizeFlags & wxSIZE_AUTO_WIDTH ) if ( (sizeFlags & wxSIZE_AUTO_WIDTH) && width == -1 )
width = sizeBest.x; width = sizeBest.x;
if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) if ( (sizeFlags & wxSIZE_AUTO_HEIGHT) && height == -1 )
height = sizeBest.y; height = sizeBest.y;
} }