mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
* Shrink font size for bigger figures.
This commit is contained in:
committed by
Michael Zanetti
parent
252b809fe4
commit
aca0f51342
@@ -74,9 +74,13 @@ StatsGauge::paintEvent( QPaintEvent* event )
|
||||
p.setPen( pen );
|
||||
QFont font = p.font();
|
||||
font.setWeight( QFont::Black );
|
||||
font.setPixelSize( 60 );
|
||||
p.setFont( font );
|
||||
|
||||
if ( value() <= 999 )
|
||||
font.setPixelSize( 60 );
|
||||
else
|
||||
font.setPixelSize( 44 );
|
||||
|
||||
p.setFont( font );
|
||||
QRect textRect( 0, gaugeSize.height() / 2 - 14, gaugeSize.width(), 62 );
|
||||
p.drawText( textRect, Qt::AlignCenter, value() > 0 ? QString::number( value() ) : "-" );
|
||||
|
||||
|
Reference in New Issue
Block a user