]> git.sesse.net Git - vlc/commitdiff
qt4: show more clearly current item in iconview
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 29 Jan 2010 15:47:14 +0000 (17:47 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 29 Jan 2010 15:48:07 +0000 (17:48 +0200)
modules/gui/qt4/components/playlist/icon_view.cpp

index 7e63ebe33e1aeeb57c21a714424153dba55fb5f9..2fb390f8502c74034e8ec551bb04c540f3becc27 100644 (file)
@@ -105,7 +105,17 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
     QPainter *pixpainter = new QPainter( &pix );
 
     pixpainter->setRenderHints(
-            QPainter::Antialiasing | QPainter::SmoothPixmapTransform );
+            QPainter::Antialiasing | QPainter::SmoothPixmapTransform |
+            QPainter::TextAntialiasing );
+
+    if( index.data( PLModel::IsCurrentRole ).toInt() > 0 )
+    {
+       pixpainter->save();
+       pixpainter->setOpacity( 0.2 );
+       pixpainter->setBrush( QBrush( Qt::gray ) );
+       pixpainter->drawRoundedRect( 0, -1, RECT_SIZE, RECT_SIZE+1, ART_RADIUS, ART_RADIUS );
+       pixpainter->restore();
+    }
 
     // Draw the drop shadow
     pixpainter->save();