From: Georg Grabler Date: Sat, 5 Feb 2011 16:58:42 +0000 (+0000) Subject: Merge branch 'dualscreen_fix' of gitorious.org:~stiat/minitube/stiats-minitube into... X-Git-Tag: 1.4.1~2^2~4^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7ab6762442984edca4ba1d060b4b6eafd9abb248;p=minitube Merge branch 'dualscreen_fix' of gitorious.org:~stiat/minitube/stiats-minitube into dualscreen_fix * re-initialized local branch and went for another solution Conflicts: src/MainWindow.cpp src/videoareawidget.cpp --- 7ab6762442984edca4ba1d060b4b6eafd9abb248 diff --cc src/MainWindow.cpp index 95f715d,93c55b8..c390bdc --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@@ -89,16 -91,35 +91,17 @@@ MainWindow::~MainWindow() } bool MainWindow::eventFilter(QObject *obj, QEvent *event) { - if (this->mediaView->isVisible()) { - if (event->type() == QEvent::MouseMove) { - QMouseEvent *mouseEvent = static_cast(event); - - const int x = mouseEvent->pos().x(); - const int y = mouseEvent->pos().y(); - - if (x >= 0 && x <= 10 && this->m_fullscreen) { - this->mediaView->setPlaylistVisible(true); - } else if ((x > this->mediaView->getPlaylistSize().width() || x < 0) && this->m_fullscreen) { - this->mediaView->setPlaylistVisible(false); - } else if (!this->m_fullscreen){ - this->mediaView->setPlaylistVisible(true); - } - - if (y >= 0 && y <= 10 && this->m_fullscreen) { - this->mainToolBar->setVisible(true); - } else if ((y > this->mainToolBar->size().height() || y < 0) && this->m_fullscreen) { - this->mainToolBar->setVisible(false); - } else if (!this->m_fullscreen) { - this->mainToolBar->setVisible(true); - } - } - if (event->type() == QEvent::FocusOut && this->m_fullscreen) { + if (event->type() == QEvent::MouseMove && this->m_fullscreen) { + QMouseEvent *mouseEvent = static_cast (event); + int x = mouseEvent->pos().x(); + int y = mouseEvent->pos().y(); + + if (y < 0 && (obj == this->mainToolBar || !(y <= 10-this->mainToolBar->height() && y >= 0-this->mainToolBar->height() ))) + this->mainToolBar->setVisible(false); + if (x < 0) this->mediaView->setPlaylistVisible(false); - this->mainToolBar->setVisible(false); - } } + if (event->type() == QEvent::ToolTip) { // kill tooltips return true;