Take menu bar into account for wxFrame client size in wxQt

Subtract the height of the menu bar too, just as we already did for the
status bar.
This commit is contained in:
Naser Buhamad
2018-06-13 23:53:58 +02:00
committed by Vadim Zeitlin
parent 6d40b7fce7
commit 5a877535a8

View File

@@ -178,6 +178,15 @@ void wxFrame::DoGetClientSize(int *width, int *height) const
sb->GetSize(NULL, &sbh);
*height -= sbh;
}
// also for menubar , we must subtract it's height here
QMenuBar *qmb = GetQMainWindow()->menuBar();
if (height && qmb)
{
QRect geometry = qmb->geometry();
*height -= geometry.height();
}
}
QMainWindow *wxFrame::GetQMainWindow() const