Also make SetMinSize() after wxSizer::Fit() work correctly
This fixes a problem similar to that fixed in the previous commit but for SetMinSize(), which was also ignored if done after calling wxSizer::Fit() and before showing the window, as the explicitly set min size was also overwritten by the pending min size computed from the client size corresponding to the sizer fitting size. The fix is similar too: just invalidate the pending minimum size if SetMinSize() is called.
This commit is contained in:
@@ -141,6 +141,8 @@ public:
|
||||
#ifdef __WXGTK3__
|
||||
void GTKUpdateClientSizeIfNecessary();
|
||||
|
||||
virtual void SetMinSize(const wxSize& minSize) wxOVERRIDE;
|
||||
|
||||
virtual void WXSetInitialFittingClientSize(int flags) wxOVERRIDE;
|
||||
|
||||
private:
|
||||
|
@@ -1568,6 +1568,14 @@ void wxTopLevelWindowGTK::GTKUpdateClientSizeIfNecessary()
|
||||
}
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::SetMinSize(const wxSize& minSize)
|
||||
{
|
||||
wxTopLevelWindowBase::SetMinSize(minSize);
|
||||
|
||||
// Explicitly set minimum size should override the pending size, if any.
|
||||
m_pendingFittingClientSizeFlags &= ~wxSIZE_SET_MIN;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowGTK::WXSetInitialFittingClientSize(int flags)
|
||||
{
|
||||
// In any case, update the size immediately.
|
||||
|
Reference in New Issue
Block a user