Qt4 - MainInterface: Make right-click on timeLabel and speedLabel display nicely...
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 23:54:51 +0000 (23:54 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 23:54:51 +0000 (23:54 +0000)
modules/gui/qt4/main_interface.cpp

index 8300925..a9d69de 100644 (file)
@@ -405,7 +405,7 @@ void MainInterface::resizeEvent( QResizeEvent *e )
  ****************************************************************************/
 void MainInterface::showSpeedMenu( QPoint pos )
 {
-    speedControlMenu->exec( QCursor::pos() );
+    speedControlMenu->exec( QCursor::pos() - pos + QPoint( 0, speedLabel->height() ) );
 }
 
 void MainInterface::showTimeMenu( QPoint pos )
@@ -413,7 +413,7 @@ void MainInterface::showTimeMenu( QPoint pos )
     QMenu menu( this );
     menu.addAction(  qtr("Elapsed Time") , this, SLOT( setElapsedTime() ) );
     menu.addAction(  qtr("Remaining Time") , this, SLOT( setRemainTime() ) );
-    menu.exec( QCursor::pos() );
+    menu.exec( QCursor::pos() - pos +QPoint( 0, timeLabel->height() ) );
 }
 
 /****************************************************************************