forked from qt-creator/qt-creator
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.
This commit is contained in:
@@ -159,7 +159,7 @@ void CustomDragAndDropIcon::enter()
|
|||||||
{
|
{
|
||||||
connect(&m_timeLine, SIGNAL( frameChanged (int)), this, SLOT(animateDrag(int)));
|
connect(&m_timeLine, SIGNAL( frameChanged (int)), this, SLOT(animateDrag(int)));
|
||||||
m_timeLine.setFrameRange(0, 10);
|
m_timeLine.setFrameRange(0, 10);
|
||||||
m_timeLine.setDuration(150);
|
m_timeLine.setDuration(10);
|
||||||
m_timeLine.setLoopCount(1);
|
m_timeLine.setLoopCount(1);
|
||||||
m_timeLine.setCurveShape(QTimeLine::EaseInCurve);
|
m_timeLine.setCurveShape(QTimeLine::EaseInCurve);
|
||||||
m_timeLine.start();
|
m_timeLine.start();
|
||||||
|
@@ -530,13 +530,13 @@ int ItemLibraryModel::getHeight(const ItemLibraryEntry &itemLibraryEntry)
|
|||||||
|
|
||||||
QPixmap ItemLibraryModel::createDragPixmap(int width, int height)
|
QPixmap ItemLibraryModel::createDragPixmap(int width, int height)
|
||||||
{
|
{
|
||||||
QImage dragImage(width, height, QImage::Format_RGB32); // TODO: draw item drag icon
|
QImage dragImage(10, 10, QImage::Format_ARGB32); // TODO: draw item drag icon
|
||||||
dragImage.fill(0xffffffff);
|
dragImage.fill(0x00ffffff); //### todo for now we disable the preview image
|
||||||
QPainter p(&dragImage);
|
QPainter p(&dragImage);
|
||||||
QPen pen(Qt::gray);
|
QPen pen(Qt::gray);
|
||||||
pen.setWidth(2);
|
// pen.setWidth(2);
|
||||||
p.setPen(pen);
|
// p.setPen(pen);
|
||||||
p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2);
|
// p.drawRect(1, 1, dragImage.width() - 2, dragImage.height() - 2);
|
||||||
return QPixmap::fromImage(dragImage);
|
return QPixmap::fromImage(dragImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user