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:
committed by
Vadim Zeitlin
parent
6d40b7fce7
commit
5a877535a8
@@ -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
|
||||
|
Reference in New Issue
Block a user