From 32b93204d35fbe25456a8dc2fc577af904412fbc Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 9 May 2011 14:36:11 +0200 Subject: [PATCH] QmlDesigner.itemLibrary: disable animation and preview. This feature is not polished enough. Also since we use the complete canvas it does not make much sense. So I disable it until we have time to polish it or decide to remove it completely. --- .../components/itemlibrary/customdraganddrop.cpp | 2 +- .../components/itemlibrary/itemlibrarymodel.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/customdraganddrop.cpp b/src/plugins/qmldesigner/components/itemlibrary/customdraganddrop.cpp index fa2df71fc58..cc42c65f0cb 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/customdraganddrop.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/customdraganddrop.cpp @@ -159,7 +159,7 @@ void CustomDragAndDropIcon::enter() { connect(&m_timeLine, SIGNAL( frameChanged (int)), this, SLOT(animateDrag(int))); m_timeLine.setFrameRange(0, 10); - m_timeLine.setDuration(150); + m_timeLine.setDuration(10); m_timeLine.setLoopCount(1); m_timeLine.setCurveShape(QTimeLine::EaseInCurve); m_timeLine.start(); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index 17b93239fb1..8175c7f8b88 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -530,13 +530,13 @@ int ItemLibraryModel::getHeight(const ItemLibraryEntry &itemLibraryEntry) QPixmap ItemLibraryModel::createDragPixmap(int width, int height) { - QImage dragImage(width, height, QImage::Format_RGB32); // TODO: draw item drag icon - dragImage.fill(0xffffffff); + QImage dragImage(10, 10, QImage::Format_ARGB32); // TODO: draw item drag icon + dragImage.fill(0x00ffffff); //### todo for now we disable the preview image QPainter p(&dragImage); QPen pen(Qt::gray); - pen.setWidth(2); - p.setPen(pen); - p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2); +// pen.setWidth(2); +// p.setPen(pen); +// p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2); return QPixmap::fromImage(dragImage); }