Add MainWindow::layoutEqually()

Distributes the space equally between all dock widgets
This commit is contained in:
Sergio Martins
2020-05-18 00:05:50 +01:00
parent 8b0be3b2ba
commit af25af1259
7 changed files with 65 additions and 1 deletions

View File

@@ -147,6 +147,22 @@ QString DropArea::affinityName() const
return QString();
}
void DropArea::layoutEqually()
{
m_layout->layoutEqually();
}
void DropArea::layoutParentContainerEqually(DockWidgetBase *dw)
{
Layouting::Item *item = m_layout->itemForFrame(dw->frame());
if (!item) {
qWarning() << Q_FUNC_INFO << "Item not found for" << dw << dw->frame();
return;
}
m_layout->layoutEqually(item->parentContainer());
}
void DropArea::hover(FloatingWindow *floatingWindow, QPoint globalPos)
{
if (!validateAffinity(floatingWindow))