You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Gestures/GesturePropertyTransition.vala
+28-6Lines changed: 28 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -88,35 +88,55 @@ public class Gala.GesturePropertyTransition : Object {
88
88
* be set immediately on {@link GestureTracker.OnEnd} not only once the animation ends to allow for interrupting the animation by starting a new gesture.
89
89
* done_callback will only be called if the animation finishes, not if it is interrupted e.g. by starting a new animation for the same property,
90
90
* destroying the actor or removing the transition.
91
+
*
92
+
* @return If a transition is currently in progress for the actor and the property the percentage how far the current value
93
+
* is towards the to_value given the final value of the ongoing transition is returned. This is usally the case if a gesture ended but was
94
+
* started again before the animation finished so this should be used to set {@link GestureTracker.initial_percentage}. If no transition
if (actual_from_value.type () != current_value.type ()) {
103
117
warning ("from_value of type %s is not of the same type as the property %s which is %s. Can't animate.", from_value.type_name (), property, current_value.type_name ());
104
118
finish ();
105
-
return;
119
+
return0;
106
120
}
107
121
108
122
if (current_value.type () != to_value.type ()) {
109
123
warning ("to_value of type %s is not of the same type as the property %s which is %s. Can't animate.", to_value.type_name (), property, current_value.type_name ());
110
124
finish ();
111
-
return;
125
+
return0;
112
126
}
113
127
114
128
// Pre calculate some things, so we don't have to do it on every update
0 commit comments