[vlc-devel] commit: [Qt] Add an icon when dragging. (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Dec 10 09:15:40 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Dec  9 21:03:55 2008 +0100| [389684949dff8c2681865e95be1f161fa9f94aca] | committer: Jean-Baptiste Kempf 

[Qt] Add an icon when dragging.

This improves the user experience.

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

 modules/gui/qt4/dialogs/toolbar.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp
index c2ead90..547c02f 100644
--- a/modules/gui/qt4/dialogs/toolbar.cpp
+++ b/modules/gui/qt4/dialogs/toolbar.cpp
@@ -329,8 +329,9 @@ void WidgetListing::startDrag( Qt::DropActions /*supportedActions*/ )
 
     QDrag *drag = new QDrag( this );
     drag->setMimeData( mimeData );
-//    drag->setHotSpot(QPoint(pixmap.width()/2, pixmap.height()/2));
-
+    QPixmap aPixmap = item->icon().pixmap( QSize( 22, 22 ) );
+    drag->setPixmap( aPixmap );
+    drag->setHotSpot( QPoint( 20, 20 ) );
     drag->exec(Qt::CopyAction | Qt::MoveAction );
 }
 




More information about the vlc-devel mailing list