[vlc-devel] commit: Qt: use styled item highlighting in playlist icon view ( Jakob Leben )

git version control git at videolan.org
Mon Jan 25 15:01:01 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Mon Jan 25 14:59:00 2010 +0100| [b19a369ae6a0dd9e0f2eb6af548e0013378ed48b] | committer: Jakob Leben 

Qt: use styled item highlighting in playlist icon view

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b19a369ae6a0dd9e0f2eb6af548e0013378ed48b
---

 modules/gui/qt4/components/playlist/icon_view.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/icon_view.cpp b/modules/gui/qt4/components/playlist/icon_view.cpp
index 7a2627a..95381c0 100644
--- a/modules/gui/qt4/components/playlist/icon_view.cpp
+++ b/modules/gui/qt4/components/playlist/icon_view.cpp
@@ -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 );




More information about the vlc-devel mailing list