Browse Source

qml: allow to inhibit animation in AnimatedBackground

this allows to avoid transitioning to undefined colors
pull/144/head
Pierre Lamot 3 years ago
committed by Steve Lhomme
parent
commit
27707e3e2f
  1. 6
      modules/gui/qt/widgets/qml/AnimatedBackground.qml

6
modules/gui/qt/widgets/qml/AnimatedBackground.qml

@ -49,6 +49,8 @@ Rectangle {
property bool animationRunning: borderAnimation.running || bgAnimation.running
property bool animate: true
//---------------------------------------------------------------------------------------------
// Implementation
//---------------------------------------------------------------------------------------------
@ -66,6 +68,8 @@ Rectangle {
//---------------------------------------------------------------------------------------------
Behavior on border.color {
enabled: root.animate
ColorAnimation {
id: borderAnimation
@ -74,6 +78,7 @@ Rectangle {
}
Behavior on color {
enabled: root.animate
ColorAnimation {
id: bgAnimation
@ -82,6 +87,7 @@ Rectangle {
}
Behavior on foregroundColor {
enabled: root.animate
ColorAnimation {
duration: root.animationDuration
}

Loading…
Cancel
Save