diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index ff165a5..7eff38b 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -586,7 +586,7 @@ CMainWindow::CMainWindow(QWidget *parent) : d->createContent(); // Default window geometry - center on screen - resize(1280, 720); + resize(1200, 1000); setGeometry(QStyle::alignedRect( Qt::LeftToRight, Qt::AlignCenter, frameSize(), QGuiApplication::primaryScreen()->availableGeometry() diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index d92ea36..d126f54 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -324,7 +324,7 @@ public: { SplitterSizes[i] = AreaSize / TotRatio; } - SplitterSizes.back() = AreaSize * AreaSize / TotRatio; + SplitterSizes.back() = AreaSize * LastRatio / TotRatio; Splitter->setSizes(SplitterSizes); } @@ -1173,7 +1173,7 @@ CDockAreaWidget* DockContainerWidgetPrivate::dockWidgetIntoDockArea(DockWidgetAr insertWidgetIntoSplitter(NewSplitter, NewDockArea, InsertParam.append()); TargetAreaSplitter->insertWidget(index, NewSplitter); TargetAreaSplitter->setSizes(TargetAreaSizes); - onAdjustSplitterSizes(TargetAreaSplitter); + onAdjustSplitterSizes(NewSplitter); } appendDockAreas({NewDockArea});