Commit 32b93204 authored by Thomas Hartmann's avatar Thomas Hartmann

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.
parent 908d73f0
......@@ -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();
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment