When not using a title-bar, don't say a tab is HTCAPTION

Otherwise tabs are not clickable
This commit is contained in:
Sergio Martins
2020-06-24 16:06:00 +01:00
parent d3aee0dabb
commit 5203718f93
7 changed files with 61 additions and 4 deletions

View File

@@ -154,3 +154,20 @@ int FrameWidget::dockWidgetCount_impl() const
return m_tabWidget->numDockWidgets();
}
QRect FrameWidget::dragRect() const
{
QRect rect = Frame::dragRect();
if (rect.isValid())
return rect;
if (Config::self().flags() & Config::Flag_HideTitleBarWhenTabsVisible) {
QTabBar *tabBar = this->tabBar();
rect.setHeight(tabBar->height());
rect.setWidth(width() - tabBar->width());
rect.moveTopLeft(QPoint(tabBar->width(), tabBar->y()));
rect.moveTopLeft(QWidget::mapToGlobal(rect.topLeft()));
}
return rect;
}