[vlc-commits] commit: Qt4: pictureflow, activate input if cliked and it' s not currently playing one (Ilkka Ollakka )

git at videolan.org git at videolan.org
Sun Oct 31 16:17:10 CET 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Oct 31 17:16:36 2010 +0200| [27b37486b546fa9dff45f3a09653f2a781d2c62a] | committer: Ilkka Ollakka 

Qt4: pictureflow, activate input if cliked and it's not currently playing one

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27b37486b546fa9dff45f3a09653f2a781d2c62a
---

 modules/gui/qt4/util/pictureflow.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/util/pictureflow.cpp b/modules/gui/qt4/util/pictureflow.cpp
index b92574b..34fe4c2 100644
--- a/modules/gui/qt4/util/pictureflow.cpp
+++ b/modules/gui/qt4/util/pictureflow.cpp
@@ -941,10 +941,13 @@ void PictureFlow::keyPressEvent(QKeyEvent* event)
 
 void PictureFlow::mousePressEvent(QMouseEvent* event)
 {
-    if (event->x() > width() / 2)
+    if (event->x() > width() / 2 + d->state->slideWidth/2 )
         showNext();
-    else
+    else if (event->x() < width() / 2 - d->state->slideWidth/2 )
         showPrevious();
+    else if ( d->state->model->currentIndex().row() != d->state->centerIndex )
+        d->state->model->activateItem( d->state->model->index( d->state->centerIndex, 0,
+                                                               d->state->model->currentIndex().parent() ) );
 }
 
 void PictureFlow::paintEvent(QPaintEvent* event)



More information about the vlc-commits mailing list