]> git.sur5r.net Git - minitube/commitdiff
* I think i fixed the dualscreen behaviour now by differing between out-of-screen...
authorGeorg Grabler <georg@grabler.net>
Sat, 5 Feb 2011 16:47:15 +0000 (16:47 +0000)
committerGeorg Grabler <georg@grabler.net>
Sat, 5 Feb 2011 16:47:15 +0000 (16:47 +0000)
src/MainWindow.cpp
src/videoareawidget.cpp

index 2064ce929de21cfa2b3f0c3dafefea528533539c..95f715d33a50e5b6541eb31a4ca68206a28a309a 100644 (file)
@@ -89,6 +89,16 @@ MainWindow::~MainWindow() {
 }
 
 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;
index f4b48e6ecae75303d638cf5dafd44646abfe2a98..2b1c6d1f2dde423020875e4d404e82a2067bb5c7 100644 (file)
@@ -107,11 +107,11 @@ void VideoAreaWidget::mouseMoveEvent(QMouseEvent *event) {
     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";
 }