Fix client size for wxFrame under wxQt

Avoid implicitly creating the menu bar by calling menuBar() and use
menuWidget() instead which just returns NULL if there is no menu bar,
allowing to calculate correct client size for frames without menus.

Closes https://github.com/wxWidgets/wxWidgets/pull/1120
This commit is contained in:
Graham Dawes
2019-01-07 14:45:28 +00:00
committed by Vadim Zeitlin
parent 5ff49cb2e2
commit fbbdcc058a

View File

@@ -179,7 +179,7 @@ void wxFrame::DoGetClientSize(int *width, int *height) const
}
if ( QMenuBar *qmb = GetQMainWindow()->menuBar() )
if ( QWidget *qmb = GetQMainWindow()->menuWidget() )
{
*height -= qmb->geometry().height();
}