mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-01 07:48:37 +02:00
[ui] UIGraph: add hoveredNode property + node hovering visual feedback
* keep track of currently hovered node in UIGraph on Python side * Node: show border on hover + make MouseArea contain everything else to always get hover events, even when cursor is over children attribute pins
This commit is contained in:
parent
5b991053a8
commit
05854ed897
3 changed files with 124 additions and 104 deletions
|
@ -308,6 +308,7 @@ Item {
|
|||
width: uigraph.layout.nodeWidth
|
||||
readOnly: root.readOnly
|
||||
selected: uigraph.selectedNode === node
|
||||
hovered: uigraph.hoveredNode === node
|
||||
onSelectedChanged: if(selected) forceActiveFocus()
|
||||
|
||||
onAttributePinCreated: registerAttributePin(attribute, pin)
|
||||
|
@ -331,6 +332,9 @@ Item {
|
|||
|
||||
onMoved: uigraph.moveNode(node, position)
|
||||
|
||||
onEntered: uigraph.hoveredNode = node
|
||||
onExited: uigraph.hoveredNode = null
|
||||
|
||||
Keys.onDeletePressed: uigraph.removeNode(node)
|
||||
|
||||
Behavior on x {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue