show hover dot instead of cursor while drawing
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 17s
Python / test (pull_request) Successful in 28s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m11s

This commit is contained in:
2026-06-20 19:00:58 +02:00
parent 81eb56e1d0
commit e619632077
5 changed files with 96 additions and 4 deletions
@@ -37,6 +37,45 @@ void StrokeCanvasItem::setPenColor(const QColor &color) {
emit penColorChanged();
}
void StrokeCanvasItem::setHoverVisible(bool visible) {
if (m_hoverVisible == visible)
return;
m_hoverVisible = visible;
update();
emit hoverVisibleChanged();
}
void StrokeCanvasItem::setHoverPoint(const QPointF &point) {
if (m_hoverPoint == point)
return;
m_hoverPoint = point;
update();
emit hoverPointChanged();
}
void StrokeCanvasItem::showHover(qreal x, qreal y) {
m_hoverPoint = {x, y};
m_hoverVisible = true;
update();
emit hoverPointChanged();
emit hoverVisibleChanged();
}
void StrokeCanvasItem::hideHover() {
if (!m_hoverVisible)
return;
m_hoverVisible = false;
update();
emit hoverVisibleChanged();
}
void StrokeCanvasItem::setPenWidth(float width) {
if (qFuzzyCompare(m_penWidth, width))
return;