From fbbdcc058a14e7944af8f3ffe6d180112994ae2c Mon Sep 17 00:00:00 2001 From: Graham Dawes Date: Mon, 7 Jan 2019 14:45:28 +0000 Subject: [PATCH] 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 --- src/qt/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/frame.cpp b/src/qt/frame.cpp index 41322c3733..f4636dc902 100644 --- a/src/qt/frame.cpp +++ b/src/qt/frame.cpp @@ -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(); }