[vlc-commits] Qt4: add the slower/faster buttons near the speed slider

Jean-Baptiste Kempf git at videolan.org
Tue Jan 3 19:16:25 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan  3 18:34:13 2012 +0100| [e06dc3899f89f45b712e8e6e0693169c72fd12e7] | committer: Jean-Baptiste Kempf

Qt4: add the slower/faster buttons near the speed slider

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

 modules/gui/qt4/components/interface_widgets.cpp |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 2fabfa3..9c8f8d8 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -411,6 +411,20 @@ SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i, QWidget *_parent )
 
     CONNECT( normalSpeedButton, clicked(), this, resetRate() );
 
+    QToolButton *slowerButton = new QToolButton( this );
+    slowerButton->setMaximumSize( QSize( 26, 16 ) );
+    slowerButton->setAutoRaise( true );
+    slowerButton->setToolTip( tooltipL[SLOWER_BUTTON] );
+    slowerButton->setIcon( QIcon( iconL[SLOWER_BUTTON] ) );
+    CONNECT( slowerButton, clicked(), THEMIM->getIM(), slower() );
+
+    QToolButton *fasterButton = new QToolButton( this );
+    fasterButton->setMaximumSize( QSize( 26, 16 ) );
+    fasterButton->setAutoRaise( true );
+    fasterButton->setToolTip( tooltipL[FASTER_BUTTON] );
+    fasterButton->setIcon( QIcon( iconL[FASTER_BUTTON] ) );
+    CONNECT( fasterButton, clicked(), THEMIM->getIM(), faster() );
+
 /*    spinBox = new QDoubleSpinBox();
     spinBox->setDecimals( 2 );
     spinBox->setMaximum( 32 );
@@ -422,7 +436,9 @@ SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i, QWidget *_parent )
 
     QGridLayout* speedControlLayout = new QGridLayout( this );
     speedControlLayout->addWidget( speedSlider, 0, 0, 1, 3 );
-    speedControlLayout->addWidget( normalSpeedButton, 1, 1 );
+    speedControlLayout->addWidget( slowerButton, 1, 0 );
+    speedControlLayout->addWidget( normalSpeedButton, 1, 1, 1, 1, Qt::AlignRight );
+    speedControlLayout->addWidget( fasterButton, 1, 2, 1, 1, Qt::AlignRight );
     //speedControlLayout->addWidget( spinBox );
     speedControlLayout->setContentsMargins( 0, 0, 0, 0 );
     speedControlLayout->setSpacing( 0 );



More information about the vlc-commits mailing list