[vlc-commits] commit: Qt: Fix SpeedLabel's tooltip (Francois Cartegnie )
git at videolan.org
git at videolan.org
Sun Mar 28 23:14:05 CEST 2010
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Mar 28 21:21:21 2010 +0200| [38c1b482fef92e9b8793421070a967813bd9c4f7] | committer: Jean-Baptiste Kempf
Qt: Fix SpeedLabel's tooltip
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=38c1b482fef92e9b8793421070a967813bd9c4f7
---
modules/gui/qt4/components/interface_widgets.cpp | 4 ++--
modules/gui/qt4/components/interface_widgets.hpp | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index c7f79ca..2409bf1 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -417,7 +417,7 @@ void VisualSelector::next()
SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
: 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 */
speedControl = new SpeedControlWidget( p_intf, this );
@@ -457,7 +457,7 @@ void SpeedLabel::setRate( float rate )
str.setNum( rate, 'f', 2 );
str.append( "x" );
setText( str );
- setToolTip( str );
+ setToolTip( tooltipStringPattern.arg( str ) );
speedControl->updateControls( rate );
}
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index cd3eb68..7cd3cfd 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -175,6 +175,7 @@ private slots:
private:
intf_thread_t *p_intf;
QMenu *speedControlMenu;
+ QString tooltipStringPattern;
SpeedControlWidget *speedControl;
};
More information about the vlc-commits
mailing list