mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
* Use new color roles.
This commit is contained in:
parent
623b5866ed
commit
929a98c21a
@ -198,7 +198,7 @@ GridItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
painter->drawRect( gradientRect );
|
||||
painter->restore();
|
||||
|
||||
painter->setPen( Qt::white );
|
||||
painter->setPen( TomahawkUtils::Colors::SELECTION_FOREGROUND );
|
||||
|
||||
QRect textRect = option.rect.adjusted( 6, option.rect.height() - frameHeight, -6, -6 );
|
||||
bool oneLiner = false;
|
||||
@ -225,8 +225,8 @@ GridItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
r.adjust( 4, 0, -4, -1 );
|
||||
if ( m_hoveringOver == index )
|
||||
{
|
||||
TomahawkUtils::drawQueryBackground( painter, opt.palette, r, 1.1 );
|
||||
painter->setPen( opt.palette.color( QPalette::HighlightedText ) );
|
||||
TomahawkUtils::drawQueryBackground( painter, r );
|
||||
painter->setPen( TomahawkUtils::Colors::SELECTION_FOREGROUND );
|
||||
}
|
||||
|
||||
to.setAlignment( Qt::AlignHCenter | Qt::AlignBottom );
|
||||
|
@ -251,8 +251,8 @@ PlayableCover::paintEvent( QPaintEvent* event )
|
||||
|
||||
if ( m_hoveredRect == r )
|
||||
{
|
||||
TomahawkUtils::drawQueryBackground( &bufpainter, palette(), r, 1.1 );
|
||||
bufpainter.setPen( Qt::white );
|
||||
TomahawkUtils::drawQueryBackground( &bufpainter, r );
|
||||
bufpainter.setPen( TomahawkUtils::Colors::SELECTION_FOREGROUND );
|
||||
}
|
||||
|
||||
to.setAlignment( Qt::AlignHCenter | Qt::AlignBottom );
|
||||
|
@ -387,21 +387,22 @@ QueryLabel::paintEvent( QPaintEvent* event )
|
||||
m_hoverType = Track;
|
||||
}
|
||||
|
||||
TomahawkUtils::drawQueryBackground( &p, palette(), m_hoverArea );
|
||||
TomahawkUtils::drawQueryBackground( &p, m_hoverArea );
|
||||
}
|
||||
|
||||
if ( elidedText != s || ( m_result.isNull() && m_query.isNull() && m_artist.isNull() && m_album.isNull() ) )
|
||||
{
|
||||
if ( m_hoverArea.width() )
|
||||
{
|
||||
p.setPen( palette().highlightedText().color() );
|
||||
p.setBrush( palette().highlight() );
|
||||
p.setBrush( TomahawkUtils::Colors::SELECTION_BACKGROUND );
|
||||
p.setPen( TomahawkUtils::Colors::SELECTION_FOREGROUND );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.setBrush( palette().window() );
|
||||
p.setPen( palette().color( foregroundRole() ) );
|
||||
}
|
||||
|
||||
p.drawText( r, m_align, elidedText );
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user