From c89ed4419631d221a8aaf29551ffbb14a5dd1e8b Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 2 Sep 2012 16:22:45 +0200 Subject: [PATCH] * Another set of font & icon size fixes. --- src/libtomahawk/widgets/ToggleButton.cpp | 3 ++- src/libtomahawk/widgets/WelcomeWidget.cpp | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/widgets/ToggleButton.cpp b/src/libtomahawk/widgets/ToggleButton.cpp index ad4aa855a..7f06ed1ed 100644 --- a/src/libtomahawk/widgets/ToggleButton.cpp +++ b/src/libtomahawk/widgets/ToggleButton.cpp @@ -21,6 +21,7 @@ #include "widgets/HeaderLabel.h" #include "utils/StyleHelper.h" +#include "utils/TomahawkUtilsGui.h" #include #include @@ -32,7 +33,7 @@ ToggleButton::ToggleButton( QWidget* parent ) { QFont f( font() ); f.setBold( true ); - f.setPixelSize( 12 ); + f.setPointSize( TomahawkUtils::defaultFontSize() + 1 ); setFont( f ); setFixedHeight( sizeHint().height() + 8 ); diff --git a/src/libtomahawk/widgets/WelcomeWidget.cpp b/src/libtomahawk/widgets/WelcomeWidget.cpp index e2f4b530d..f52194dbb 100644 --- a/src/libtomahawk/widgets/WelcomeWidget.cpp +++ b/src/libtomahawk/widgets/WelcomeWidget.cpp @@ -304,9 +304,8 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, else if( type == RecentlyPlayedPlaylistsModel::Station ) icon = m_stationIcon; - QRect pixmapRect = option.rect.adjusted( 10, 13, -option.rect.width() + option.rect.height() - 26, -13 ); + QRect pixmapRect = option.rect.adjusted( 10, 14, -option.rect.width() + option.rect.height() - 18, -14 ); icon = icon.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation ); - painter->drawPixmap( pixmapRect, icon ); if ( type != RecentlyPlayedPlaylistsModel::Station ) @@ -318,7 +317,7 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, // int bottomEdge = pixmapRect // right edge 10px past right edge of pixmapRect // bottom edge flush with bottom of pixmap - QRect rect( pixmapRect.right() - width , 0, width - 8, 0 ); + QRect rect( pixmapRect.right() - width, 0, width - 8, 0 ); rect.adjust( -2, 0, 0, 0 ); rect.setTop( pixmapRect.bottom() - painter->fontMetrics().height() - 1 ); rect.setBottom( pixmapRect.bottom() + 1 );