]> git.sesse.net Git - vlc/commitdiff
Qt4: Save a couple temporaries.
authorJP Dinger <jpd@videolan.org>
Sat, 28 Nov 2009 18:21:56 +0000 (19:21 +0100)
committerJP Dinger <jpd@videolan.org>
Sat, 5 Dec 2009 21:25:43 +0000 (22:25 +0100)
modules/gui/qt4/components/interface_widgets.cpp

index 07520e514b6182ea1b3450ee896bd8cd49157802..595db88625858634014fe29a8dc8b7c5a602148b 100644 (file)
@@ -619,12 +619,10 @@ void TimeLabel::setDisplayPosition( float pos, int time, int length )
                                                            : time );
 
     QString timestr;
                                                            : time );
 
     QString timestr;
-    timestr.sprintf( "%s/%s", psz_time,
-                            ( !length && time ) ? "--:--" : psz_length );
+    timestr.sprintf( " %s%s/%s ", (b_remainingTime && length) ? "-" : "",
+                     psz_time, ( !length && time ) ? "--:--" : psz_length );
 
 
-    /* Add a minus to remaining time*/
-    if( b_remainingTime && length ) setText( " -"+timestr+" " );
-    else setText( " "+timestr+" " );
+    setText( timestr );
 }
 
 void TimeLabel::toggleTimeDisplay()
 }
 
 void TimeLabel::toggleTimeDisplay()
@@ -635,8 +633,8 @@ void TimeLabel::toggleTimeDisplay()
 void TimeLabel::setCaching( float f_cache )
 {
     QString amount;
 void TimeLabel::setCaching( float f_cache )
 {
     QString amount;
-    amount.setNum( (int)(100 * f_cache) );
-    setText( "Buff: " + amount + "%" );
+    amount.sprintf("Buff: %i%%", (int)(100*f_cache) );
+    setText( amount );
 }
 
 
 }