icon apears on the droped pos not topleft coner

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672121
This commit is contained in:
Siraj Razick 2007-06-06 06:09:42 +00:00
parent a2b7f5fc43
commit cd701724cb

View File

@ -249,6 +249,7 @@ void Corona::dropEvent(QGraphicsSceneDragDropEvent *event)
icon->setIcon(KMimeType::iconNameForUrl(url));
icon->setSize(128,128);
//TODO: associate the url with the icon, use the Button plasmoid here
icon->setPos(event->scenePos()-QPoint(icon->boundingRect().width()/2,icon->boundingRect().height()/2));
icon->show();
addItem(icon);
}