From be4cfb5f169e4b8af223b9c60c247a7f98b43d66 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 9 Aug 2017 15:37:45 +0200 Subject: [PATCH] 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 --- .../components/formeditor/abstractformeditortool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp index 291f17fad50..2cf53f0e79c 100644 --- a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp @@ -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); }