1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

Fixed page background and selection colors.

This commit is contained in:
Christian Muehlhaeuser
2015-01-29 12:33:44 +01:00
parent b4a284a25d
commit bc4ba84212
3 changed files with 9 additions and 8 deletions

View File

@@ -48,12 +48,12 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
TrackItemDelegate* del = new TrackItemDelegate( TrackItemDelegate::LovedTracks, m_trackView, m_trackView->proxyModel() ); TrackItemDelegate* del = new TrackItemDelegate( TrackItemDelegate::LovedTracks, m_trackView, m_trackView->proxyModel() );
m_trackView->setPlaylistItemDelegate( del ); m_trackView->setPlaylistItemDelegate( del );
m_trackView->proxyModel()->setStyle( PlayableProxyModel::Fancy ); m_trackView->proxyModel()->setStyle( PlayableProxyModel::Fancy );
m_trackView->setStyleSheet( QString( "QTreeView { background-color: %1; }" ).arg( TomahawkStyle::PAGE_BACKGROUND.name() ) );
TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() ); TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() );
setLayout( new QVBoxLayout() ); setLayout( new QVBoxLayout() );
TomahawkUtils::unmarginLayout( layout() ); TomahawkUtils::unmarginLayout( layout() );
m_trackView->setStyleSheet( QString( "QTreeView { background-color: %1; }" ).arg( TomahawkStyle::PAGE_BACKGROUND.name() ) );
m_captionLabel = new CaptionLabel( this ); m_captionLabel = new CaptionLabel( this );
setCaption( caption ); setCaption( caption );
@@ -119,7 +119,7 @@ ContextView::setTrackView( TrackView* view )
} }
m_trackView = view; m_trackView = view;
m_trackView->setStyleSheet( QString( "QTreeView { background-color: white; }" ) ); m_trackView->setStyleSheet( QString( "QTreeView { background-color: %1; }" ).arg( TomahawkStyle::PAGE_BACKGROUND.name() ) );
TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() ); TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() );
m_innerLayout->insertWidget( 0, view, 1 ); m_innerLayout->insertWidget( 0, view, 1 );

View File

@@ -45,6 +45,7 @@
#include "utils/ImageRegistry.h" #include "utils/ImageRegistry.h"
#include "utils/PixmapDelegateFader.h" #include "utils/PixmapDelegateFader.h"
#include "utils/Closure.h" #include "utils/Closure.h"
#include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
@@ -560,11 +561,11 @@ PlaylistItemDelegate::drawTrack( QPainter* painter, const QStyleOptionViewItem&
if ( option.state & QStyle::State_Selected ) if ( option.state & QStyle::State_Selected )
{ {
painter->setPen( QColor( "#f8f8f8" ) ); painter->setPen( TomahawkStyle::SELECTION_BACKGROUND );
painter->setBrush( QColor( "#f8f8f8" ) ); painter->setBrush( TomahawkStyle::SELECTION_BACKGROUND );
painter->drawRect( rect.adjusted( 0, 4, -rightMargin, -4 ) ); painter->drawRect( rect.adjusted( 0, 4, -rightMargin, -4 ) );
} }
painter->setPen( QColor( "#000000" ) ); painter->setPen( TomahawkStyle::SELECTION_FOREGROUND );
QRect r = rect.adjusted( 32, 6, -32 -rightMargin, -6 ); QRect r = rect.adjusted( 32, 6, -32 -rightMargin, -6 );
const int margin = 8; const int margin = 8;

View File

@@ -50,7 +50,7 @@ namespace TomahawkStyle
DLLEXPORT void stylePageWidget( QWidget* widget ); DLLEXPORT void stylePageWidget( QWidget* widget );
DLLEXPORT void styleScrollBar( QScrollBar* scrollBar ); DLLEXPORT void styleScrollBar( QScrollBar* scrollBar );
static const QColor PAGE_BACKGROUND = QColor( "#F9F9F9" ); static const QColor PAGE_BACKGROUND = QColor( "#ffffff" );
static const QColor HEADER_LABEL = QColor( 255, 255, 255, 240 ); static const QColor HEADER_LABEL = QColor( 255, 255, 255, 240 );
static const QColor HEADER_BACKGROUND = QColor( "#333333" ); static const QColor HEADER_BACKGROUND = QColor( "#333333" );
@@ -63,8 +63,8 @@ namespace TomahawkStyle
static const QColor NOW_PLAYING_ITEM = QColor( "#ff004c" ); static const QColor NOW_PLAYING_ITEM = QColor( "#ff004c" );
static const QColor NOW_PLAYING_ITEM_TEXT = QColor( "#ffffff" ); static const QColor NOW_PLAYING_ITEM_TEXT = QColor( "#ffffff" );
static const QColor SELECTION_BACKGROUND = QColor( "#7DC4FF" ); static const QColor SELECTION_BACKGROUND = QColor( "#f8f8f8" );
static const QColor SELECTION_FOREGROUND = QColor( "#ffffff" ); static const QColor SELECTION_FOREGROUND = QColor( "#000000" );
static const QColor HEADER_TEXT = QColor( "#DBDBDB" ); static const QColor HEADER_TEXT = QColor( "#DBDBDB" );
static const QColor HEADER_LINK = QColor( "#7DC4FF" ); static const QColor HEADER_LINK = QColor( "#7DC4FF" );