Commit 836fbdd9 authored by WINTZ Julien's avatar WINTZ Julien

Fixing interaction.

Was: due to tracking, move event always occured ...
parent 3fc79a0f
......@@ -791,12 +791,17 @@ void dtkWidgetsMenuBar::resizeEvent(QResizeEvent *event)
void dtkWidgetsMenuBar::mousePressEvent(QMouseEvent *event)
{
if(!(event->buttons() & Qt::LeftButton))
return;
d->o_pos = event->globalPos();
}
void dtkWidgetsMenuBar::mouseMoveEvent(QMouseEvent *event)
{
// do not move window when we are over a menu button
if(!(event->buttons() & Qt::LeftButton))
return;
if ((event->pos().y() < ((::size + ::margin) * this->size())) ||
(event->pos().y() > d->c->size().height() - (::size + ::margin)))
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment