Commit 3f76017c authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

[FEATURE] Make the grabbing area for Transform Tool handles twice lager than the handles themselves

BUG:334933
CCMAIL:kimageshop@kde.org
parent dedcbc77
......@@ -109,8 +109,10 @@ KisToolTransform::KisToolTransform(KoCanvasBase * canvas)
m_imageTooBig = false;
m_origDevice = 0;
m_origSelection = 0;
m_handleRadius = 12;
m_rotationCenterRadius = 12;
m_handleVisualRadius = 12; // size for painting on screed
m_rotationCenterVisualRadius = 12;
m_handleRadius = 2 * m_handleVisualRadius; // the threshold for a mouse drag
m_rotationCenterRadius = 2 * m_rotationCenterVisualRadius;
m_maxRadius = (m_handleRadius > m_rotationCenterRadius) ? m_handleRadius : m_rotationCenterRadius;
......@@ -509,10 +511,10 @@ void KisToolTransform::paint(QPainter& gc, const KoViewConverter &converter)
// Draw Handles
qreal d = m_handleRadius / scaleFromAffineMatrix(m_handlesTransform);
qreal d = m_handleVisualRadius / scaleFromAffineMatrix(m_handlesTransform);
QRectF handleRect(-0.5 * d, -0.5 * d, d, d);
qreal r = m_rotationCenterRadius / scaleFromAffineMatrix(m_handlesTransform);
qreal r = m_rotationCenterVisualRadius / scaleFromAffineMatrix(m_handlesTransform);
QRectF rotationCenterRect(-0.5 * r, -0.5 * r, r, r);
QPainterPath handles;
......
......@@ -382,6 +382,8 @@ private:
ToolTransformArgs m_clickArgs;
int m_handleRadius;
int m_rotationCenterRadius;
int m_handleVisualRadius;
int m_rotationCenterVisualRadius;
int m_maxRadius;
bool m_actuallyMoveWhileSelected; // true <=> selection has been moved while clicked
......
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