]> git.sesse.net Git - vlc/commitdiff
Qt: use styled item highlighting in playlist icon view
authorJakob Leben <jleben@videolan.org>
Mon, 25 Jan 2010 13:59:00 +0000 (14:59 +0100)
committerJakob Leben <jleben@videolan.org>
Mon, 25 Jan 2010 13:59:00 +0000 (14:59 +0100)
modules/gui/qt4/components/playlist/icon_view.cpp

index 7a2627acadc4083576de8995d006543101428b26..95381c0594d9b20b7c1b1867970a6eb7176c9468 100644 (file)
@@ -28,6 +28,7 @@
 #include <QPainter>
 #include <QRect>
 #include <QStyleOptionViewItem>
+#include <QApplication>
 
 #include "assert.h"
 
@@ -39,8 +40,9 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
 {
     painter->setRenderHint( QPainter::Antialiasing );
 
-    if( option.state & QStyle::State_Selected )
-         painter->fillRect(option.rect, option.palette.highlight());
+    /*if( option.state & QStyle::State_Selected )
+         painter->fillRect(option.rect, option.palette.highlight());*/
+    QApplication::style()->drawPrimitive( QStyle::PE_PanelItemViewItem, &option, painter );
 
     PLItem *currentItem = static_cast<PLItem*>( index.internalPointer() );
     assert( currentItem );