[vlc-devel] commit: qt4: show more clearly current item in iconview (Ilkka Ollakka )
git version control
git at videolan.org
Fri Jan 29 16:48:09 CET 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jan 29 17:47:14 2010 +0200| [d9fed02a9ff516a763b313fe15652d7d0d5c4d5b] | committer: Ilkka Ollakka
qt4: show more clearly current item in iconview
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9fed02a9ff516a763b313fe15652d7d0d5c4d5b
---
modules/gui/qt4/components/playlist/icon_view.cpp | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/icon_view.cpp b/modules/gui/qt4/components/playlist/icon_view.cpp
index 7e63ebe..2fb390f 100644
--- a/modules/gui/qt4/components/playlist/icon_view.cpp
+++ b/modules/gui/qt4/components/playlist/icon_view.cpp
@@ -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();
More information about the vlc-devel
mailing list