mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Implement pulse animation option for ComboBox widget
You can now call pulse() on it and it'll pulse in the warning colour. Contributes to issue CURA-8849.
This commit is contained in:
parent
bd131257fe
commit
e095d41f0b
1 changed files with 29 additions and 2 deletions
|
@ -54,7 +54,34 @@ ComboBox
|
|||
}
|
||||
]
|
||||
|
||||
background: UM.UnderlineBackground{}
|
||||
background: UM.UnderlineBackground
|
||||
{
|
||||
//Rectangle for highlighting when this combobox needs to pulse.
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
color: UM.Theme.getColor("warning")
|
||||
|
||||
SequentialAnimation on opacity
|
||||
{
|
||||
id: pulseAnimation
|
||||
running: false
|
||||
loops: 1
|
||||
alwaysRunToEnd: true
|
||||
PropertyAnimation
|
||||
{
|
||||
to: 1
|
||||
duration: 300
|
||||
}
|
||||
PropertyAnimation
|
||||
{
|
||||
to: 0
|
||||
duration : 2000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
indicator: UM.ColorImage
|
||||
{
|
||||
|
@ -167,6 +194,6 @@ ComboBox
|
|||
|
||||
function pulse()
|
||||
{
|
||||
//TODO: Initiate a pulse of colour.
|
||||
pulseAnimation.restart();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue