From a12184ea32752fc002965d27a513d3e4df47ca83 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 1 Jul 2016 18:36:58 +0200 Subject: [PATCH] QmlDesigner.StatesEditor: Adjust margins The "magic" -2 keeps the margins symmetric. The states editor now nearly looks like the blog post proposal. Only the highlight color is different, but already comes from the theming engine. Change-Id: Ibae5a3f19a7b07063ea44933498c24519bd34e94 Reviewed-by: Alessandro Portale --- .../qmldesigner/statesEditorQmlSources/StatesDelegate.qml | 4 +++- .../qmldesigner/statesEditorQmlSources/StatesList.qml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index a194a8d1e90..8c5d85af5d8 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -105,12 +105,14 @@ Rectangle { Item { id: stateImageArea - anchors.topMargin: 1 + anchors.topMargin: 4 anchors.left: stateNameField.left anchors.top: stateNameField.bottom height: delegateStateImageSize + 2 width: delegateStateImageSize + 2 + + visible: expanded Rectangle { anchors.margins: -1 anchors.fill: stateImage diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml index 3bc453f721d..5a67c536c6d 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml @@ -31,7 +31,7 @@ import "../common" FocusScope { id: root - height: expanded ? 136 : 32 + height: expanded ? 136 : 30 signal createNewState signal deleteState(int internalNodeId) signal duplicateCurrentState @@ -39,7 +39,7 @@ FocusScope { property int stateImageSize: 100 property int delegateWidth: stateImageSize + 10 property int padding: 2 - property int delegateHeight: root.height - padding * 2 + property int delegateHeight: root.height - padding * 2 + 1 property int innerSpacing: -1 property int currentStateInternalId : 0