1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 04:51:53 +02:00

paint the hovered item w/o QStyle::State_Selected but w/ QStyle::State_Active

This commit is contained in:
Michael Zanetti 2011-08-24 08:42:44 +02:00
parent 9f6dd0a104
commit 01c2927339

View File

@ -182,7 +182,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
&& m_expandedMap.contains( index ) && m_expandedMap.value( index )->partlyExpanded() && dropTypeCount( item ) > 0 )
{
// Let Qt paint the original item. We add our stuff after it
o.state &= QStyle::State_Selected;
o.state &= ~QStyle::State_Selected;
o.showDecorationSelected = false;
o.rect.adjust( 0, 0, 0, - option.rect.height() + m_expandedMap.value( index )->originalSize().height() );
QStyledItemDelegate::paint( painter, o, index );