Fix frame client size in wxQT, thanks @seandepagnier
Compute frame size subtracting statusbar, and handle NULL status bar git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f8ccdd0bcf
commit
09f176eed0
@ -52,6 +52,9 @@ public:
|
||||
|
||||
virtual QAbstractScrollArea *QtGetScrollBarsContainer() const;
|
||||
|
||||
protected:
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS( wxFrame );
|
||||
|
@ -171,6 +171,20 @@ QAbstractScrollArea *wxFrame::QtGetScrollBarsContainer() const
|
||||
return dynamic_cast <QAbstractScrollArea *> (GetHandle()->centralWidget() );
|
||||
}
|
||||
|
||||
void wxFrame::DoGetClientSize(int *width, int *height) const
|
||||
{
|
||||
wxWindow::DoGetClientSize(width, height);
|
||||
|
||||
// for a status bar, we must subtract it's height here
|
||||
wxStatusBar *sb = GetStatusBar();
|
||||
if (height && sb)
|
||||
{
|
||||
int sbh = 0;
|
||||
sb->GetSize(NULL, &sbh);
|
||||
*height -= sbh;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
wxQtMainWindow::wxQtMainWindow( wxWindow *parent, wxFrame *handler )
|
||||
|
Loading…
Reference in New Issue
Block a user