Merge branch 'mediaplayer_sample'

Add wxMC_NO_AUTORESIZE and use it in mediaplayer sample to fix it
layout.

See https://github.com/wxWidgets/wxWidgets/pull/2562
This commit is contained in:
Vadim Zeitlin
2021-11-20 21:41:58 +01:00
4 changed files with 28 additions and 6 deletions

View File

@@ -466,6 +466,9 @@ void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h)
void wxMediaBackendCommonBase::NotifyMovieSizeChanged()
{
if ( m_ctrl->HasFlag(wxMC_NO_AUTORESIZE) )
return;
// our best size changed after opening a new file
m_ctrl->InvalidateBestSize();
m_ctrl->SetSize(m_ctrl->GetSize());