Move workaround for initial TLW size to wxGTK itself
Add wxWindow::WXSetInitialFittingClientSize() instead of handling wxGTK TLWs specially in the common wxSizer code and override it in wxGTK to remember that we need to reset the client size once the window is shown. This commit shouldn't result in any changes in the observed behaviour.
This commit is contained in:
@@ -139,6 +139,13 @@ enum
|
||||
wxSEND_EVENT_POST = 1
|
||||
};
|
||||
|
||||
// Flags for WXSetInitialFittingClientSize().
|
||||
enum
|
||||
{
|
||||
wxSIZE_SET_CURRENT = 0x0001, // Set the current size.
|
||||
wxSIZE_SET_MIN = 0x0002 // Set the size as the minimum allowed size.
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// (pseudo)template list classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1541,6 +1548,13 @@ public:
|
||||
// window is part of a composite control.
|
||||
bool WXSendContextMenuEvent(const wxPoint& posInScreenCoords);
|
||||
|
||||
// This internal function needs to be called to set the fitting client size
|
||||
// (i.e. the minimum size determined by the window sizer) when the size
|
||||
// that we really need to use is not known until the window is actually
|
||||
// shown, as is the case for TLWs with recent GTK versions, as it will
|
||||
// update the size again when it does become known, if necessary.
|
||||
virtual void WXSetInitialFittingClientSize(int flags);
|
||||
|
||||
// get the handle of the window for the underlying window system: this
|
||||
// is only used for wxWin itself or for user code which wants to call
|
||||
// platform-specific APIs
|
||||
|
Reference in New Issue
Block a user