From 06b39e6826c7e851f1df6e0c79ec115871c688f1 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 24 Mar 2015 17:44:48 +0100 Subject: [PATCH] Updated default styles for download button and progress bar. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 8 ++++---- src/libtomahawk/utils/TomahawkStyle.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index ee444d24b..cd496b294 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -400,11 +400,11 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt } else { - painter->setPen( TomahawkStyle::PLAYLIST_BUTTON_BACKGROUND.darker() ); - painter->setBrush( TomahawkStyle::PLAYLIST_BUTTON_FOREGROUND ); + painter->setPen( TomahawkStyle::PLAYLIST_PROGRESS_FOREGROUND.darker() ); + painter->setBrush( TomahawkStyle::PLAYLIST_PROGRESS_BACKGROUND ); painter->drawRect( optc.rect.adjusted( 2, 2, -2, -2 ) ); - painter->setPen( TomahawkStyle::PLAYLIST_BUTTON_BACKGROUND ); - painter->setBrush( TomahawkStyle::PLAYLIST_BUTTON_BACKGROUND ); + painter->setPen( TomahawkStyle::PLAYLIST_PROGRESS_FOREGROUND ); + painter->setBrush( TomahawkStyle::PLAYLIST_PROGRESS_FOREGROUND ); QRect fillp = optc.rect.adjusted( 3, 3, -3, -3 ); fillp.setWidth( float(fillp.width()) * ( float(item->result()->downloadJob()->progressPercentage()) / 100.0 ) ); painter->drawRect( fillp ); diff --git a/src/libtomahawk/utils/TomahawkStyle.h b/src/libtomahawk/utils/TomahawkStyle.h index 47c536236..81ed1a2f7 100644 --- a/src/libtomahawk/utils/TomahawkStyle.h +++ b/src/libtomahawk/utils/TomahawkStyle.h @@ -100,9 +100,12 @@ namespace TomahawkStyle static const QColor SEEKSLIDER_FOREGROUND = QColor( "#ffffff" ); - static const QColor PLAYLIST_BUTTON_BACKGROUND = QColor( "#E61878" ); + static const QColor PLAYLIST_BUTTON_BACKGROUND = QColor( "#111111" ); static const QColor PLAYLIST_BUTTON_FOREGROUND = QColor( "#ffffff" ); + static const QColor PLAYLIST_PROGRESS_BACKGROUND = QColor( "#ffffff" ); + static const QColor PLAYLIST_PROGRESS_FOREGROUND = QColor( "#E61878" ); + static const int POPUP_ROUNDING_RADIUS = 6; static const float POPUP_OPACITY = 0.93; }