FancyMainWindow: Limit DockWidget title popup area

Change-Id: I5f43a84e5c5ff8bf69700d6ba6f6534df001eb7b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2016-12-14 12:20:42 +01:00
parent a7a02897e7
commit 11e0eaacc3

View File

@@ -290,7 +290,7 @@ bool DockWidget::eventFilter(QObject *, QEvent *event)
QMouseEvent *me = static_cast<QMouseEvent *>(event);
int y = me->pos().y();
int x = me->pos().x();
int h = m_titleBar->m_floatButton->height();
int h = qMin(8, m_titleBar->m_floatButton->height());
if (!isFloating() && widget() && 0 <= x && x < widget()->width() && 0 <= y && y <= h) {
m_timer.start();
m_startPos = mapToGlobal(me->pos());