forked from qt-creator/qt-creator
FancyMainWindow: Limit DockWidget title popup area
Change-Id: I5f43a84e5c5ff8bf69700d6ba6f6534df001eb7b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -290,7 +290,7 @@ bool DockWidget::eventFilter(QObject *, QEvent *event)
|
|||||||
QMouseEvent *me = static_cast<QMouseEvent *>(event);
|
QMouseEvent *me = static_cast<QMouseEvent *>(event);
|
||||||
int y = me->pos().y();
|
int y = me->pos().y();
|
||||||
int x = me->pos().x();
|
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) {
|
if (!isFloating() && widget() && 0 <= x && x < widget()->width() && 0 <= y && y <= h) {
|
||||||
m_timer.start();
|
m_timer.start();
|
||||||
m_startPos = mapToGlobal(me->pos());
|
m_startPos = mapToGlobal(me->pos());
|
||||||
|
Reference in New Issue
Block a user