Fix wxNotebook::CalcSizeFromPage() to account for tabs height
Actually implement this function instead of just returning the size passed into it. Closes https://github.com/wxWidgets/wxWidgets/pull/1425
This commit is contained in:
parent
1ca012240a
commit
c8eef72417
@ -14,6 +14,7 @@
|
||||
#include "wx/qt/private/winevent.h"
|
||||
|
||||
#include <QtWidgets/QTabWidget>
|
||||
#include <QtWidgets/QTabBar>
|
||||
|
||||
class wxQtTabWidget : public wxQtEventSignalHandler< QTabWidget, wxNotebook >
|
||||
{
|
||||
@ -162,7 +163,10 @@ bool wxNotebook::InsertPage(size_t n, wxWindow *page, const wxString& text,
|
||||
|
||||
wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
|
||||
{
|
||||
return sizePage;
|
||||
QTabBar *tabBar = m_qtTabWidget->tabBar();
|
||||
const QSize &tabBarSize = tabBar->size();
|
||||
return wxSize(sizePage.GetWidth(),
|
||||
sizePage.GetHeight() + tabBarSize.height());
|
||||
}
|
||||
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
|
Loading…
Reference in New Issue
Block a user