[vlc-commits] Qt: TimeLabel: use padding, not margin and spaces
Francois Cartegnie
git at videolan.org
Tue Mar 13 17:25:04 CET 2012
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 13 16:27:13 2012 +0100| [d3a13c633381c8017f6e657a566e80102f8caabf] | committer: Francois Cartegnie
Qt: TimeLabel: use padding, not margin and spaces
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3a13c633381c8017f6e657a566e80102f8caabf
---
modules/gui/qt4/components/interface_widgets.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 030d104..af6aaa0 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -585,7 +585,7 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType )
this, updateBuffering( float ) );
CONNECT( bufTimer, timeout(), this, updateBuffering() );
- this->setContentsMargins( 4, 0, 4, 0 );
+ setStyleSheet( "padding-left: 4px; padding-right: 4px;" );
}
void TimeLabel::setDisplayPosition( float pos, int64_t t, int length )
@@ -596,9 +596,9 @@ void TimeLabel::setDisplayPosition( float pos, int64_t t, int length )
if( pos == -1.f )
{
if( displayType == TimeLabel::Both )
- setText( " --:--/--:-- " );
+ setText( "--:--/--:--" );
else
- setText( " --:-- " );
+ setText( "--:--" );
return;
}
@@ -610,17 +610,17 @@ void TimeLabel::setDisplayPosition( float pos, int64_t t, int length )
switch( displayType )
{
case TimeLabel::Elapsed:
- setText( QString(" ") + QString( psz_time ) + QString(" ") );
+ setText( QString( psz_time ) );
break;
case TimeLabel::Remaining:
if( b_remainingTime )
- setText( QString(" -") + QString( psz_time ) + QString(" ") );
+ setText( QString("-") + QString( psz_time ) );
else
- setText( QString(" ") + QString( psz_length ) + QString(" ") );
+ setText( QString( psz_length ) );
break;
case TimeLabel::Both:
default:
- QString timestr = QString( " %1%2/%3 " )
+ QString timestr = QString( "%1%2/%3" )
.arg( QString( (b_remainingTime && length) ? "-" : "" ) )
.arg( QString( psz_time ) )
.arg( QString( ( !length && time ) ? "--:--" : psz_length ) );
@@ -643,7 +643,7 @@ void TimeLabel::setDisplayPosition( float pos )
secstotimestr( psz_time,
( b_remainingTime && cachedLength ?
cachedLength - time : time ) );
- QString timestr = QString( " %1%2/%3 " )
+ QString timestr = QString( "%1%2/%3" )
.arg( QString( (b_remainingTime && cachedLength) ? "-" : "" ) )
.arg( QString( psz_time ) )
.arg( QString( ( !cachedLength && time ) ? "--:--" : psz_length ) );
More information about the vlc-commits
mailing list