Commit 38c1b482 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

Qt: Fix SpeedLabel's tooltip

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cc28873a
...@@ -417,7 +417,7 @@ void VisualSelector::next() ...@@ -417,7 +417,7 @@ void VisualSelector::next()
SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent ) SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
: QLabel( parent ), p_intf( _p_intf ) : QLabel( parent ), p_intf( _p_intf )
{ {
setToolTip( qtr( "Current playback speed.\nClick to adjust" ) ); tooltipStringPattern = qtr( "Current playback speed: %1\nClick to adjust" );
/* Create the Speed Control Widget */ /* Create the Speed Control Widget */
speedControl = new SpeedControlWidget( p_intf, this ); speedControl = new SpeedControlWidget( p_intf, this );
...@@ -457,7 +457,7 @@ void SpeedLabel::setRate( float rate ) ...@@ -457,7 +457,7 @@ void SpeedLabel::setRate( float rate )
str.setNum( rate, 'f', 2 ); str.setNum( rate, 'f', 2 );
str.append( "x" ); str.append( "x" );
setText( str ); setText( str );
setToolTip( str ); setToolTip( tooltipStringPattern.arg( str ) );
speedControl->updateControls( rate ); speedControl->updateControls( rate );
} }
......
...@@ -175,6 +175,7 @@ private slots: ...@@ -175,6 +175,7 @@ private slots:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
QMenu *speedControlMenu; QMenu *speedControlMenu;
QString tooltipStringPattern;
SpeedControlWidget *speedControl; SpeedControlWidget *speedControl;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment