Correct client/window confusing in wxPreviewFrame code

Pass the window size to SetSizeHints() to make sure the window minimum
size is set as expected.
This commit is contained in:
Vadim Zeitlin
2022-05-21 17:12:50 +01:00
parent 4b9721536c
commit fc0a4d4e62

View File

@@ -1780,7 +1780,7 @@ void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind)
// want to make it at least as wide as the control bar, as otherwise the
// buttons wouldn't fit, and restricting it to at least its height
// vertically is also quite reasonable.
SetSizeHints(m_controlBar->GetBestSize());
SetSizeHints(ClientToWindowSize(m_controlBar->GetBestSize()));
m_modalityKind = kind;
switch ( m_modalityKind )