mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Start animating the gauge with value 1.
This commit is contained in:
@@ -91,8 +91,8 @@ StatsGauge::paintEvent( QPaintEvent* event )
|
|||||||
pen = QPen( Qt::white );
|
pen = QPen( Qt::white );
|
||||||
p.setPen( pen );
|
p.setPen( pen );
|
||||||
font = p.font();
|
font = p.font();
|
||||||
font.setWeight( QFont::Black );
|
font.setWeight( QFont::DemiBold );
|
||||||
font.setPixelSize( 18 );
|
font.setPixelSize( 16 );
|
||||||
p.setFont( font );
|
p.setFont( font );
|
||||||
|
|
||||||
QColor figColor( "#3e3e3e" );
|
QColor figColor( "#3e3e3e" );
|
||||||
@@ -112,7 +112,7 @@ StatsGauge::setValue( int v )
|
|||||||
{
|
{
|
||||||
QPropertyAnimation* a = new QPropertyAnimation( (QProgressBar*)this, "value" );
|
QPropertyAnimation* a = new QPropertyAnimation( (QProgressBar*)this, "value" );
|
||||||
a->setEasingCurve( QEasingCurve( QEasingCurve::InOutQuad ) );
|
a->setEasingCurve( QEasingCurve( QEasingCurve::InOutQuad ) );
|
||||||
a->setStartValue( value() );
|
a->setStartValue( value() > 0 ? value() : 1 );
|
||||||
a->setEndValue( v );
|
a->setEndValue( v );
|
||||||
a->setDuration( 2000 );
|
a->setDuration( 2000 );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user