mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Draw PE_PanelItemViewRow instead of PE_PanelItemViewItem, and draw it
underneath the text.
This commit is contained in:
@@ -302,8 +302,6 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
void
|
void
|
||||||
SourceTreeView::paintEvent( QPaintEvent* event )
|
SourceTreeView::paintEvent( QPaintEvent* event )
|
||||||
{
|
{
|
||||||
QTreeView::paintEvent( event );
|
|
||||||
|
|
||||||
if ( m_dragging && !m_dropRect.isEmpty() )
|
if ( m_dragging && !m_dropRect.isEmpty() )
|
||||||
{
|
{
|
||||||
QPainter painter( viewport() );
|
QPainter painter( viewport() );
|
||||||
@@ -313,8 +311,9 @@ SourceTreeView::paintEvent( QPaintEvent* event )
|
|||||||
QStyleOptionViewItemV4 opt;
|
QStyleOptionViewItemV4 opt;
|
||||||
opt.initFrom( this );
|
opt.initFrom( this );
|
||||||
opt.rect = itemRect;
|
opt.rect = itemRect;
|
||||||
opt.state = QStyle::State_Enabled | QStyle::State_MouseOver;
|
opt.state = QStyle::State_Enabled | QStyle::State_Selected;
|
||||||
|
|
||||||
style()->drawPrimitive( QStyle::PE_PanelItemViewItem, &opt, &painter, this );
|
style()->drawPrimitive( QStyle::PE_PanelItemViewRow, &opt, &painter, this );
|
||||||
}
|
}
|
||||||
|
QTreeView::paintEvent( event );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user