From ef00f9c21ad8236b3bdcc38a132dea900477a5a4 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 20 Jun 2013 19:42:13 +0200 Subject: [PATCH] This breaks too many things: Revert "Some dashboard design tweaks" This reverts commit 22ce38adbb0ff03a5b41428b584cebbbd6336f8f. --- src/libtomahawk/utils/TomahawkStyle.h | 2 -- src/libtomahawk/widgets/Dashboard.cpp | 13 +++++-------- src/libtomahawk/widgets/HeaderLabel.cpp | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/libtomahawk/utils/TomahawkStyle.h b/src/libtomahawk/utils/TomahawkStyle.h index bfca7b43b..fdb18c84d 100644 --- a/src/libtomahawk/utils/TomahawkStyle.h +++ b/src/libtomahawk/utils/TomahawkStyle.h @@ -89,8 +89,6 @@ namespace TomahawkStyle static const QColor FOOTNOTES_BACKGROUND = QColor( "#272b2e" ); static const QColor DASHBOARD_ROUNDFIGURE_BACKGROUND = QColor( "#454e59" ); - static const QColor DASHBOARD_ROUNDFIGURE_KNOCKOUT = QColor( "#DBDBDB" ); - static const QColor DASHBOARD_ROUNDFIGURE_KNOCKOUT_TEXT = QColor( "#292F34" ); static const QColor SIDEBAR_ROUNDFIGURE_BACKGROUND = QColor( 167, 183, 211 ); static const QColor SIDEBAR_ROUNDFIGURE_INBOX_BACKGROUND = QColor( 239, 140, 51 ); diff --git a/src/libtomahawk/widgets/Dashboard.cpp b/src/libtomahawk/widgets/Dashboard.cpp index b76c89df9..5baecf1ed 100644 --- a/src/libtomahawk/widgets/Dashboard.cpp +++ b/src/libtomahawk/widgets/Dashboard.cpp @@ -92,7 +92,6 @@ Dashboard::Dashboard( QWidget* parent ) ui->playlistWidget->overlay()->resize( 380, 86 ); ui->playlistWidget->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel ); - QPalette p = ui->playlistWidget->palette(); p.setColor( QPalette::Text, TomahawkStyle::HEADER_TEXT ); p.setColor( QPalette::BrightText, TomahawkStyle::HEADER_TEXT ); @@ -336,17 +335,15 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, font.setPointSize( TomahawkUtils::defaultFontSize() - 1 ); QFont boldFont = font; - boldFont.setFamily( "Titillium Web" ); boldFont.setBold( true ); - boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 2 ); + boldFont.setPointSize( TomahawkUtils::defaultFontSize() ); QFontMetrics boldFontMetrics( boldFont ); QFont figFont = boldFont; - figFont.setFamily( "Titillium Web" ); figFont.setPointSize( TomahawkUtils::defaultFontSize() - 1 ); QPixmap icon; - QRect pixmapRect = option.rect.adjusted( 10, 14, -option.rect.width() + option.rect.height() - 27, - 21 ); + QRect pixmapRect = option.rect.adjusted( 10, 14, -option.rect.width() + option.rect.height() - 18, -14 ); RecentlyPlayedPlaylistsModel::PlaylistTypes type = (RecentlyPlayedPlaylistsModel::PlaylistTypes)index.data( RecentlyPlayedPlaylistsModel::PlaylistTypeRole ).toInt(); if ( type == RecentlyPlayedPlaylistsModel::StaticPlaylist ) @@ -369,11 +366,11 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, // bottom edge flush with bottom of pixmap QRect rect( pixmapRect.right() - width, 0, width - 8, 0 ); rect.adjust( -2, 0, 0, 0 ); - rect.setTop( pixmapRect.bottom() - painter->fontMetrics().height() - 2 ); + rect.setTop( pixmapRect.bottom() - painter->fontMetrics().height() - 1 ); rect.setBottom( pixmapRect.bottom() + 1 ); - QColor figColor( TomahawkStyle::DASHBOARD_ROUNDFIGURE_KNOCKOUT ); - painter->setPen( TomahawkStyle::DASHBOARD_ROUNDFIGURE_KNOCKOUT_TEXT ); + QColor figColor( TomahawkStyle::DASHBOARD_ROUNDFIGURE_BACKGROUND ); + painter->setPen( Qt::white ); painter->setBrush( figColor ); TomahawkUtils::drawBackgroundAndNumbers( painter, tracks, rect ); diff --git a/src/libtomahawk/widgets/HeaderLabel.cpp b/src/libtomahawk/widgets/HeaderLabel.cpp index 9c6f2742a..2e3a22561 100644 --- a/src/libtomahawk/widgets/HeaderLabel.cpp +++ b/src/libtomahawk/widgets/HeaderLabel.cpp @@ -38,7 +38,7 @@ HeaderLabel::HeaderLabel( QWidget* parent ) f.setPointSize( TomahawkUtils::defaultFontSize() ); setFont( f ); - setFixedHeight( TomahawkUtils::defaultFontHeight() * 2 ); + setFixedHeight( TomahawkUtils::defaultFontHeight() * 1.4 ); setMouseTracking( true ); }