Skip to content

Commit

Permalink
feat(ScaleRevealer): finish crossfade early (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Oct 3, 2024
1 parent 58b3123 commit 663f0a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Widgets/ScaleRevealer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class Tuba.Widgets.ScaleRevealer : Adw.Bin {
construct {
var target = new Adw.CallbackAnimationTarget (animation_target_cb);
animation = new Adw.TimedAnimation (this, 0.0, 1.0, ANIMATION_DURATION, target) {
easing = Adw.Easing.EASE_OUT_QUART
easing = Adw.Easing.EASE_IN_OUT_QUART
};
animation.done.connect (on_animation_end);

Expand Down Expand Up @@ -138,7 +138,9 @@ public class Tuba.Widgets.ScaleRevealer : Adw.Bin {
warning ("The source widget texture is None, using child snapshot as fallback");
this.snapshot_child (this.child, snapshot);
} else {
if (progress > 0.0) {
if (progress > 0.3) {
this.snapshot_child (this.child, snapshot);
} else if (progress > 0.0) {
snapshot.push_cross_fade (progress);
source_widget_texture.snapshot (
snapshot,
Expand All @@ -149,7 +151,7 @@ public class Tuba.Widgets.ScaleRevealer : Adw.Bin {

this.snapshot_child (this.child, snapshot);
snapshot.pop ();
} else if (progress <= 0.0) {
} else {
source_widget_texture.snapshot (
snapshot,
this.get_width (),
Expand Down

0 comments on commit 663f0a2

Please sign in to comment.