Commit 636e7566 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - timeLabel cosmetic.

parent f45f6bf7
...@@ -150,6 +150,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -150,6 +150,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Widgets Creation*/ /* Widgets Creation*/
b_remainingTime = false; b_remainingTime = false;
timeLabel = new TimeLabel; timeLabel = new TimeLabel;
timeLabel->setText( " --:--/--:-- " );
timeLabel->setAlignment( Qt::AlignRight ); timeLabel->setAlignment( Qt::AlignRight );
nameLabel = new QLabel; nameLabel = new QLabel;
nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
...@@ -811,13 +812,13 @@ void MainInterface::setDisplayPosition( float pos, int time, int length ) ...@@ -811,13 +812,13 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
: time ); : time );
QString title; QString timestr;
title.sprintf( "%s/%s", psz_time, timestr.sprintf( "%s/%s", psz_time,
( !length && time ) ? "--:--" : psz_length ); ( !length && time ) ? "--:--" : psz_length );
/* Add a minus to remaining time*/ /* Add a minus to remaining time*/
if( b_remainingTime && length ) timeLabel->setText( " -"+title+" " ); if( b_remainingTime && length ) timeLabel->setText( " -"+timestr+" " );
else timeLabel->setText( " "+title+" " ); else timeLabel->setText( " "+timestr+" " );
} }
void MainInterface::toggleTimeDisplay() void MainInterface::toggleTimeDisplay()
......
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