Commit be4cfb5f authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Adjust margings for "move zone"

I introduced a zone around the boarder of each item where
it can always be dragged,
instead of selection another overlapping item.
The area is now a lot smaller, but the 4px seem enough for me
when testing it.
This zone is slightly to big. I keep the size of 20px at the top
so the label/gizmo is always dragable.

Change-Id: Ia1b8afb822b506f5322b952d5537eafc73b52ea2
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 5f9c7c89
......@@ -152,8 +152,8 @@ bool AbstractFormEditorTool::selectedItemCursorInMovableArea(const QPointF &pos)
QRectF boundingRect = boundingRectInSceneSpace.boundingRect();
QRectF innerRect = boundingRect;
innerRect.adjust(10, 10, -10, -10);
boundingRect.adjust(-10, -20, 10, 10);
innerRect.adjust(2, 2, -2, -2);
boundingRect.adjust(-2, -20, 2, 2);
return !innerRect.contains(pos) && boundingRect.contains(pos);
}
......
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