1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-22 13:43:11 +02:00

Draw whole row background on osx

This commit is contained in:
Leo Franchi
2011-08-13 15:15:50 -04:00
parent 9ca97d2e1a
commit 29b0b4e431

View File

@@ -93,7 +93,14 @@ TreeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
o.state |= QStyle::State_Selected; o.state |= QStyle::State_Selected;
} }
#ifdef Q_OS_MAC
int oldX = o.rect.x();
o.rect.setX( 0 );
#endif
qApp->style()->drawControl( QStyle::CE_ItemViewItem, &o, painter ); qApp->style()->drawControl( QStyle::CE_ItemViewItem, &o, painter );
#ifdef Q_OS_MAC
o.rect.setX( oldX );
#endif
{ {
QRect r = o.rect.adjusted( 3, 0, 0, 0 ); QRect r = o.rect.adjusted( 3, 0, 0, 0 );