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:
committed by
Vadim Zeitlin
parent
5ff49cb2e2
commit
fbbdcc058a
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user