Commit 2d2e2523 authored by Marco Bubke's avatar Marco Bubke
Browse files

Feedback area is now anchored to the mouse pointer

parent 05108af8
...@@ -92,6 +92,8 @@ void FormEditorGraphicsView::mouseMoveEvent(QMouseEvent *event) ...@@ -92,6 +92,8 @@ void FormEditorGraphicsView::mouseMoveEvent(QMouseEvent *event)
QGraphicsView::mouseMoveEvent(mouseEvent); QGraphicsView::mouseMoveEvent(mouseEvent);
delete mouseEvent; delete mouseEvent;
} }
m_feedbackOriginPoint = event->pos() + QPoint(50, -80);
} }
...@@ -119,7 +121,7 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r ...@@ -119,7 +121,7 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r
painter->save(); painter->save();
painter->translate(mapToScene(QPoint(3, 3))); painter->translate(mapToScene(m_feedbackOriginPoint));
QColor changeColor(QColor(Qt::green).lighter(170)); QColor changeColor(QColor(Qt::green).lighter(170));
......
...@@ -64,6 +64,7 @@ private: ...@@ -64,6 +64,7 @@ private:
bool m_beginYHasExpression; bool m_beginYHasExpression;
bool m_beginWidthHasExpression; bool m_beginWidthHasExpression;
bool m_beginHeightHasExpression; bool m_beginHeightHasExpression;
QPoint m_feedbackOriginPoint;
}; };
} // namespace QmlDesigner } // namespace QmlDesigner
......
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