1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-20 07:52:30 +02:00

Merge pull request #108 from teo/master

Workaround to force QtCurve to not draw branching primitives in SourceTreeView
This commit is contained in:
Leo Franchi 2012-08-01 06:13:10 -07:00
commit 36fcbe83b7
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 );