Commit 8e5de8b3 authored by Jan Möbius's avatar Jan Möbius

Dennis: Fixed context menu in autohide mode.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6674 383ad7c9-94d9-4d36-a494-682f7c89f535
parent dffbacee
...@@ -108,6 +108,8 @@ QtSlideWindow::QtSlideWindow(QString _name, QGraphicsItem *_parent) : ...@@ -108,6 +108,8 @@ QtSlideWindow::QtSlideWindow(QString _name, QGraphicsItem *_parent) :
hide (); hide ();
connect (hideTimeLine_, SIGNAL(finished()), this, SLOT(timelineFinished())); connect (hideTimeLine_, SIGNAL(finished()), this, SLOT(timelineFinished()));
setAcceptsHoverEvents (true);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -219,7 +221,7 @@ Qt::WindowFrameSection QtSlideWindow::windowFrameSectionAt(const QPointF &_pos) ...@@ -219,7 +221,7 @@ Qt::WindowFrameSection QtSlideWindow::windowFrameSectionAt(const QPointF &_pos)
void QtSlideWindow::hoverEnterEvent (QGraphicsSceneHoverEvent *) void QtSlideWindow::hoverEnterEvent (QGraphicsSceneHoverEvent *)
{ {
if (autohideButton_->isChecked ()) if (autohideButton_->isChecked () && hideTimeLine_->currentTime() != SLIDE_DURATION)
{ {
hideTimeLine_->setDirection (QTimeLine::Forward); hideTimeLine_->setDirection (QTimeLine::Forward);
if (hideTimeLine_->state () == QTimeLine::NotRunning) if (hideTimeLine_->state () == QTimeLine::NotRunning)
...@@ -238,7 +240,8 @@ void QtSlideWindow::hoverEnterEvent (QGraphicsSceneHoverEvent *) ...@@ -238,7 +240,8 @@ void QtSlideWindow::hoverEnterEvent (QGraphicsSceneHoverEvent *)
void QtSlideWindow::hoverLeaveEvent (QGraphicsSceneHoverEvent *) void QtSlideWindow::hoverLeaveEvent (QGraphicsSceneHoverEvent *)
{ {
if (autohideButton_->isChecked ()) if (autohideButton_->isChecked () &&
(!scene ()->mouseGrabberItem () || !childItems ().contains (scene ()->mouseGrabberItem ())))
{ {
hideTimeLine_->setDirection (QTimeLine::Backward); hideTimeLine_->setDirection (QTimeLine::Backward);
if (hideTimeLine_->state () == QTimeLine::NotRunning) if (hideTimeLine_->state () == QTimeLine::NotRunning)
......
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