1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 16:29:43 +01:00

Ensure that we do not draw branching primitives under QtCurve.

This commit is contained in:
Teo Mrnjavac 2012-08-01 12:52:26 +02:00
parent c7cbb47742
commit 003b959482
2 changed files with 8 additions and 0 deletions

View File

@ -838,6 +838,13 @@ SourceTreeView::drawRow( QPainter* painter, const QStyleOptionViewItem& option,
QTreeView::drawRow( painter, option, index );
}
void
SourceTreeView::drawBranches( QPainter *painter, const QRect &rect, const QModelIndex &index ) const
{
if( !QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
QTreeView::drawBranches( painter, rect, index );
}
template< typename T > T*
SourceTreeView::itemFromIndex( const QModelIndex& index ) const

View File

@ -89,6 +89,7 @@ private slots:
protected:
void drawRow( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
void drawBranches( QPainter *painter, const QRect &rect, const QModelIndex &index ) const;
virtual void paintEvent( QPaintEvent* event );