}
bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
+ if (event->type() == QEvent::MouseMove && this->m_fullscreen) {
+ QMouseEvent *mouseEvent = static_cast<QMouseEvent*> (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);
+ }
if (event->type() == QEvent::ToolTip) {
// kill tooltips
return true;
const int x = event->pos().x();
const int y = event->pos().y();
- bool visible = y <= 0;
+ bool visible = y <= 10;
bool ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenToolbar", Qt::DirectConnection, Q_ARG(bool, visible));
if (!ret) qDebug() << "showFullscreenToolbar invokeMethod failed";
- visible = x <= 0;
+ visible = x <= 10;
ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenPlaylist", Qt::DirectConnection, Q_ARG(bool, visible));
if (!ret) qDebug() << "showFullscreenPlaylist invokeMethod failed";
}