Less concurrent animations

Overview was trying always to animate the opening with 2 animations at the same moment:

* the transition from initial to active in WindowHeapDelegate
* the animation on the partialactivationfactor was always ran, partial or not

this resulted in jankier animations than they could be.

now base only on partialanimationfactor, so we a re sure there is one single way to trigger the effect
wilder/Plasma/6.2
Marco Martin 2 years ago committed by Vlad Zahorodnii
parent c16a5e355f
commit 022214e411
  1. 11
      src/plugins/private/qml/WindowHeapDelegate.qml
  2. 19
      src/plugins/windowview/qml/main.qml

@ -81,7 +81,7 @@ Item {
}
component TweenBehavior : Behavior {
enabled: thumb.state !== "partial" && thumb.windowHeap.animationEnabled && thumb.animationEnabled && !thumb.activeDragHandler.active
enabled: thumb.state === "active-normal" && thumb.windowHeap.animationEnabled && thumb.animationEnabled && !thumb.activeDragHandler.active
NumberAnimation {
duration: thumb.windowHeap.animationDuration
easing.type: Easing.OutCubic
@ -338,15 +338,6 @@ Item {
properties: "x, y, width, height"
easing.type: Easing.OutCubic
}
},
Transition {
to: "initial, initial-hidden, active-normal, active-hidden"
enabled: thumb.windowHeap.animationEnabled
NumberAnimation {
duration: thumb.windowHeap.animationDuration
properties: "x, y, width, height, opacity"
easing.type: Easing.OutCubic
}
}
]

@ -200,8 +200,27 @@ Item {
~KWinComponents.WindowFilterModel.CriticalNotification
}
delegate: WindowHeapDelegate {
id: delegate
windowHeap: heap
partialActivationFactor: container.organized ? 1 : 0
Behavior on partialActivationFactor {
SequentialAnimation {
PropertyAction {
target: delegate
property: "gestureInProgress"
value: true
}
NumberAnimation {
duration: container.effect.animationDuration
easing.type: Easing.OutCubic
}
PropertyAction {
target: delegate
property: "gestureInProgress"
value: false
}
}
}
opacity: 1 - downGestureProgress
onDownGestureTriggered: window.closeWindow()

Loading…
Cancel
Save