[ui] GraphEditor: simplify attributes connection

* make Drag/DropArea overflow on the attribute's label to be more tolerant when connecting attributes
* add visual feedback when hovering interactive areas
* tweak spacings between attributes
This commit is contained in:
Yann Lanthony 2018-07-27 18:21:25 +02:00
parent e95c88292e
commit 713ca7c6a3
2 changed files with 39 additions and 17 deletions

View file

@ -106,6 +106,7 @@ Item {
Column {
id: inputs
width: parent.width / 2
spacing: 1
Repeater {
model: node.attributes
delegate: Loader {
@ -120,6 +121,7 @@ Item {
readOnly: root.readOnly
Component.onCompleted: attributePinCreated(attribute, inPin)
Component.onDestruction: attributePinDeleted(attribute, inPin)
onPressed: root.pressed(mouse)
onChildPinCreated: attributePinCreated(childAttribute, inPin)
onChildPinDeleted: attributePinDeleted(childAttribute, inPin)
}
@ -130,6 +132,7 @@ Item {
id: outputs
width: parent.width / 2
anchors.right: parent.right
spacing: 1
Repeater {
model: node.attributes
@ -143,7 +146,9 @@ Item {
nodeItem: root
attribute: object
readOnly: root.readOnly
onPressed: root.pressed(mouse)
Component.onCompleted: attributePinCreated(object, outPin)
Component.onDestruction: attributePinDeleted(attribute, outPin)
}
}
}