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