]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/icon_view.cpp
Qt4: don't draw background on nodes in icon_view by default
[vlc] / modules / gui / qt4 / components / playlist / icon_view.cpp
index 6a01d6e9fe422d7b702f7ad9cfc030df4c995b73..edf68ef59f0a4a60d89bcb1eeae2a2a81aac61bb 100644 (file)
@@ -164,15 +164,17 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
     //Draw children indicator
     if( !index.data( PLModel::IsLeafNodeRole ).toBool() )
     {
-        painter->setOpacity( 0.75 );
         QRect r( option.rect );
         r.setSize( QSize( 25, 25 ) );
         r.translate( 5, 5 );
         if( index.data( PLModel::IsCurrentsParentNodeRole ).toBool() )
-            painter->fillRect( r, option.palette.color( QPalette::Highlight ) );
-        else
-            painter->fillRect( r, option.palette.color( QPalette::Mid ) );
-        painter->setOpacity( 1.0 );
+        {
+            painter->setOpacity( 0.75 );
+            QPainterPath nodeRectPath;
+            nodeRectPath.addRoundedRect( r, 4, 4 );
+            painter->fillPath( nodeRectPath, option.palette.color( QPalette::Highlight ) );
+            painter->setOpacity( 1.0 );
+        }
         QPixmap dirPix( ":/type/node" );
         QRect r2( dirPix.rect() );
         r2.moveCenter( r.center() );