Highlight settings when changed by DependentOn
This commit is contained in:
parent
e559ef1470
commit
03c51db3e5
2 changed files with 25 additions and 1 deletions
|
@ -21,9 +21,10 @@ Item {
|
|||
id: targetConnection
|
||||
onChoiceChanged:
|
||||
{
|
||||
if(overlap.indexOf(target.choice) == -1)
|
||||
if(parent.choice != undefined && overlap.indexOf(target.choice) == -1)
|
||||
{
|
||||
parent.reset()
|
||||
parent.highlight()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +35,7 @@ Item {
|
|||
if(parent.choice != undefined && overlap.indexOf(targetConnection.target.choice) == -1)
|
||||
{
|
||||
targetConnection.target.choice = overlap[0]
|
||||
targetConnection.target.highlight()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,4 +60,26 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
function highlight()
|
||||
{
|
||||
highlightAnimation.start()
|
||||
}
|
||||
|
||||
NumberAnimation
|
||||
{
|
||||
id: highlightAnimation
|
||||
target: fillRectangle
|
||||
property: "opacity"
|
||||
from: 0.5
|
||||
to: 0
|
||||
duration: 1000
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: fillRectangle
|
||||
anchors.fill: parent
|
||||
color: Theme.highlightBackgroundColor
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue