1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-03 10:53:39 +02:00

* Fixed a few more font-size calculations.

This commit is contained in:
Christian Muehlhaeuser
2012-09-01 17:25:36 +02:00
parent 409c8afec1
commit 48bf565ea9
3 changed files with 18 additions and 29 deletions

View File

@@ -62,17 +62,6 @@ JobStatusView::JobStatusView( AnimatedSplitter* parent )
m_view->setAttribute( Qt::WA_MacShowFocusRect, 0 );
m_view->setUniformItemSizes( false );
#ifndef Q_WS_WIN
QFont f = font();
f.setPointSize( f.pointSize() - 1 );
setFont( f );
#endif
#ifdef Q_WS_MAC
f.setPointSize( f.pointSize() - 2 );
setFont( f );
#endif
new PipelineStatusManager( this );
new TransferStatusManager( this );
new LatchedStatusManager( this );

View File

@@ -157,44 +157,44 @@ PlaylistChartItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem&
}
QFont figureFont = opt.font;
figureFont.setPointSize( 17 );
figureFont.setPointSize( TomahawkUtils::defaultFontSize() + 6 );
figureFont.setWeight( 99 );
QFont boldFont = opt.font;
boldFont.setPointSize( 12 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 1 );
boldFont.setWeight( 99 );
QFont smallBoldFont = opt.font;
smallBoldFont.setPointSize( 9 );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() );
smallBoldFont.setWeight( 60 );
QFont durationFont = opt.font;
durationFont.setPointSize( 9 );
durationFont.setPointSize( TomahawkUtils::defaultFontSize() );
durationFont.setWeight( 80 );
QFontMetrics durationFontMetrics( durationFont );
if ( index.row() == 0 )
{
figureFont.setPointSize( 34 );
boldFont.setPointSize( 24 );
smallBoldFont.setPointSize( 20 );
figureFont.setPointSize( TomahawkUtils::defaultFontSize() + 33 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 13 );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() + 9 );
}
else if ( index.row() == 1 )
{
figureFont.setPointSize( 28 );
boldFont.setPointSize( 20 );
smallBoldFont.setPointSize( 15 );
figureFont.setPointSize( TomahawkUtils::defaultFontSize() + 17 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 9 );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() + 4 );
}
else if ( index.row() == 2 )
{
figureFont.setPointSize( 20 );
boldFont.setPointSize( 15 );
smallBoldFont.setPointSize( 11 );
figureFont.setPointSize( TomahawkUtils::defaultFontSize() + 9 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 4 );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() + 2 );
}
else if ( index.row() >= 10 )
{
boldFont.setPointSize( 9 );
smallBoldFont.setPointSize( 8 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() - 1 );
}
QRect figureRect = r.adjusted( 0, 0, -option.rect.width() + 60 - 6 + r.left(), 0 );

View File

@@ -205,18 +205,18 @@ PlaylistLargeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem&
painter->drawPixmap( avatarRect, avatar );
QFont boldFont = opt.font;
boldFont.setPointSize( 11 );
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 2 );
boldFont.setWeight( 99 );
QFontMetrics boldFontMetrics( boldFont );
QFont smallBoldFont = opt.font;
smallBoldFont.setPointSize( 8 );
smallBoldFont.setPointSize( TomahawkUtils::defaultFontSize() - 1 );
smallBoldFont.setBold( true );
smallBoldFont.setWeight( 60 );
QFontMetrics smallBoldFontMetrics( smallBoldFont );
QFont smallFont = opt.font;
smallFont.setPointSize( 7 );
smallFont.setPointSize( TomahawkUtils::defaultFontSize() - 2 );
r.adjust( pixmapRect.width() + 12, 1, -28 - avatar.width(), 0 );
QRect leftRect = r.adjusted( 0, 0, -48, 0 );